I have subclassed a UITableViewCell and within this class I want to get it's height. How can I achieve this?
I have tried:
self.frame.size.height
but not sure if it is giving me the correct height value.
I have subclassed a UITableViewCell and within this class I want to get it's height. How can I achieve this?
I have tried:
self.frame.size.height
but not sure if it is giving me the correct height value.
You can use either self.bounds.size.height or self.contentView.frame.size.height, depending on which you actually need. They often differ by 1.0f which is the thickness of the table view cell separator.
Keep in mind that you can rely on those values mainly in -layoutSubviews, in other words after the table view sets the cell's frame.