Iphone Table Cell Sizes
-
21-04-2021 - |
Question
I'm using custom cells in my table view. I have the height of the cells set but for only the 10th cell in the table I need to resize.
Solution
You need to implement the UITableViewDelegate
method heightForRowAtIndexPath:
Something like this:
- (CGFloat) tableView: (UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if ( indexPath.row == 10 )
return 100.0;
return 40.0;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow