// Use the estimatedheight methods to quickly calcuate guessed values which would allow for fast load times of the table. // If These methods is implemented, the ABOVE-TABLEVIEW:HEIGHTFORXXX calls would be deferred until view S is ready for being displayed, so more expensive logic can be placed there. -(CGFloat) TableView: (UITableView *) TableView Estimatedheightforrowatindexpath: (Nsindexpath *) Indexpath Ns_ Available_ios (7_0); -(CGFloat) TableView: (UITableView *) TableView estimatedheightforheaderinsection: (nsinteger) Section Ns_ Available_ios (7_0); -(CGFloat) TableView: (UITableView *) TableView estimatedheightforfooterinsection: (nsinteger) Section Ns_available_ IOS (7_0);
The proxy methods of the above three table view can implement the corresponding
Tableview:heightforrowatindexpath:
Tableview:heightforheaderinsection:
Tableview:heightforfooterinsection:
Three agent methods and return Cell,header View,footer View Agent method Exchange Order of execution
And then obediently calculate the height and return to the height in the corresponding method is OK ~
As for how to calculate, Baidu or Google can find a lot of blogs ~
Overtime ing~
IOS Dynamic compute Cell Height utility API