Do I need to set heightForRowAtIndexPath if I use a custom UITableViewCell?

Do I need to set heightForRowAtIndexPath if I use a custom UITableViewCell? In my NIB, I already set the cell height.

When I overload heightForRowAtIndexPath, the contents of my cell do not appear even if it is set to the height defined in the NIB.

If I do not overload heightForRowAtIndexPath, the contents of the cell appear, but overflow occurs, since the default height is not big enough.

+5
source share
1 answer

, rowHeight UITableView tableView:heightForRowAtIndexPath:. , tableView:heightForRowAtIndexPath:.

, NIB, , tableView:cellForRowAtIndexPath:.

, NIB, prototypeCell, , . tableView:heightForRowAtIndexPath: , prototypeCell. , NIB. prototypeCell.frame.size.height.

+12

All Articles