In my UITableView
i've set different heights for different rows using the delegate method: tableView:heightForRowAtIndexPath:
Now given a NSIndexPath
, I would like to get the height I've previously assigned for a specific row.
You can use this
CGRect frame = [tableView rectForRowAtIndexPath:indexPath];
NSLog(@"row height : %f", frame.size.height);
Using frame.size.height
you can get height of particular row
Swift 3
let frame = tableView.rectForRow(at: indexPath)
print(frame.size.height)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With