I have a table with 2 types of prototype cells. First cell is acting as a static cell. And on `didselect' method of the other rows(from 1 to end), I just need to add a component to the 1st cell. And then the height of the 1st cell should be increased according to the content inside in it. My idea was trying to increase the cell height with,
- (CGFloat)tableView: (UITableView *)tableView heightForRowAtIndexPath: (NSIndexPath *)indexPath {
if(indexPath.row == 0){
TagTableViewCell *cell = [tableView cellForRowAtIndexPath:[NSIndexPath indexPathWithIndex:0]];
return [cell.tagView systemLayoutSizeFittingSize: UILayoutFittingCompressedSize].height + 1;
}else {
return 75;
}
}
But I couldn't access the cell. I got a bad request. Is this a convenient way to do this or is there any other ways? Advise me.