How do you hide an expanded tableviews label when it is expanded? - IOS <p>I would like to hide an expanded tableviews label, when the cell is expanded and hide a button when it is collapsed. I have my cell implementation in another class, with the property of the label and the button in the header. The problem is that when I call these cell methods in the ExpandedViewController, the code goes into the method, but it won't change the properties behaviour. Could you possibly help me with this issue?</p> <p>Thank you </p> <p>ExpandedCell.h</p> <pre><code>@property (nonatomic, retain) IBOutlet UILabel *lblTitle; @property (strong, nonatomic) IBOutlet UIButton *setTime; </code></pre> <p>ExpandedCell.m</p> <pre><code>(void)setIfHidden:(BOOL)showIfHidden { if (showIfHidden) { [self.lblTitle setHidden:YES]; [self.setTime setHidden:NO]; } else { [self.lblTitle setHidden:NO]; [self.setTime setHidden:YES]; } } </code></pre> <p>ExpandedViewController.m</p> <pre><code>import ExpandedCell.h </code></pre> <p>.</p> <pre><code>(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if ([indexPath isEqual:self.expandedIndexPath]) { return CELL_HEIGHT_EXPANDED; } else { return CELL_HEIGHT_COLLAPSED; } } (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { self.expandedIndexPath = ([self.expandedIndexPath isEqual:indexPath]) ? nil : indexPath; ExpandedCell *hideCell = [[ExpandedCell alloc] init]; showIfHidden = YES; [hideCell setIfHidden:showIfHidden]; [tableView beginUpdates]; [tableView endUpdates]; [tableView deselectRowAtIndexPath:indexPath animated:YES]; } </code></pre>