IOS Dynamic compute Cell Height utility API

Source: Internet
Author: User

// 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.