1.它會調用代理方法確定有幾行
numberOfSectionsInTableView:
2.確定每行的表頭高和表尾高(如果設定了HeardView和FooterView)
heightForHeaderInSection:
tableView:heightForFooterInSection:
3.確定每行有多少的cell
numberOfRowsInSection:
4.然後確定每行cell的高度
heightForRowAtIndexPath:
如果有多個section和row則循環執行上面的代碼
5.以上信息確定完畢後及調用代理方法去獲取cell
cellForRowAtIndexPath:
6.返回cell的高度
heightForRowAtIndexPath:
7.cell將要顯示到屏幕上
willDisplayCell:forRowAtIndexPath:
8.cell超出屏幕進行服用時及會調用兩次
heightForRowAtIndexPath:
然後在進行調用 5 . 6. 7 方法