Ios:uitableviewcell's own understanding of the re-use

Source: Internet
Author: User

UITableViewCell multiplexing in iOS that's very important, the interview will be asked, the following to say my own understanding

First look at an effect


When the screen and cell height is certain, the screen first renders a visible part, when sliding, the first to draw a page, the next to enter the visual page, at this time there is no reuse pool is not identified as "id" cell can be reused, so will execute if statement, create, when the first screen, Will be labeled, put in the reuse pool, when the beginning of the sliding page, the eighth (serial number) to enter when it will go back to use, the second put to the reuse pool, and then slide the third into the reuse pool, until they are all gone into the reuse pool, will not create new objects, so that can be achieved to reduce the creation of new objects to save memory , Apple's function room is very powerful is also a good mechanism, really want to thank the Apple development team

Ios:uitableviewcell's own understanding of the re-use

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.