Calculate the table's contentSize.height with custom cells of different types iphone

前端 未结 7 1151
-上瘾入骨i
-上瘾入骨i 2020-12-16 15:03

In my application , the tableview is having different types of custom cells with different heights. I want to put a view below this tableView, for which I need to calculate

相关标签:
7条回答
  • 2020-12-16 15:46

    The header and footer of the section are not considered in the height of the table, consider this

    CGSize sz = self.table.contentSize;
    sz.height += self.table.contentInset.bottom +
                 self.table.contentInset.top + 
                 self.table.numberOfSections * self.table.sectionHeaderHeight;
    
    0 讨论(0)
提交回复
热议问题