each cell in my table has a label, with maximum three lines, so the cell height depends on the label’s height, I know the delegate method that returns height for a specific cell(NSIndexPath), but I need to get the actual cell in order to determine the height, and if I call cellForRow:atIndexPath: in heightForCell:, it loops infinitely, I guess cellForRow also calls heightForCell. So is there any way I can handle this?
Thanks!
You can use NSStrings size for string in the heightForRow: delegate method e.g.
This will give you a CGSize you can then use the height from here and add a little padding. You can find more information here: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/NSString_UIKit_Additions/Reference/Reference.html
Tim