1.numberOfSectionsInTableView:method return tableview有n个section,
只执行一次。
2.tableView:numberOfRowsInSection:
required method return 一个section
有多少行. 他执行的次数是 n 次。若设置了tableHeaderView,他执行的次数是 2*n 次。
3.tableView:heightForRowAtIndexPath: method return cell height.
他执行的次数是所有cell的个数。
4.tableView:heightForHeaderInSection: method return height of section header。
他执行的次数是2*n
5.tableView:heightForFooterInSection: method return height of section footer。
他执行的次数是2*n
建议:
1.不是特殊情况只还回一个section就行
2.当 height of celll 相同时, 可以用属性rowHeight 代替
tableView:heightForRowAtIndexPath:method
3.当height For Header In Section 相同时可以用 sectionHeaderHeight属性
代替tableView:heightForHeaderInSection:method。
4.当height For Footer In Section 相同时可以用 sectionFooterHeight属性
sectionFooterHeight属性
代替tableView:heightForFooterInSection:method。
代替tableView:heightForFooterInSection:method。