Different height for section header UITableView

1.2k Views Asked by At

I have some issue with section header height, so:

In storyboard I defined prototype and I assigned it to the section header view, in Size Inspector with height "100", but I also created a method "heightForHeaderInSection" where I set "90".

The result is that simulator draws section with height 90, but when I call "self.tableView.sectionHeaderHeight" it gives me 100.

How can I get height from "heightForHeaderInSection" with 90 value programmatically?

1

There are 1 best solutions below

0
Bharat Modi On BEST ANSWER

Try this

CGFloat headerViewHeight = [self.tableView headerViewForSection:0].frame.size.height;