Cell for iOS UITableView Development

Source: Internet
Author: User

 

 

When the list is rolled, some uitableviewcells are removed from the window, And UITableView puts the UITableViewCell outside the window into an object pool, waiting for reuse. When UITableView requires dataSource to return UITableViewCell, dataSource will first view this object pool. If there is an unused UITableViewCell in the pool, dataSource will configure the UITableViewCell with new data and then return it to UITableView, re-display in the window to avoid creating new objects

 

UITableViewCell has an NSString * reuseIdentifier attribute. When initializing UITableViewCell, You can input a specific string ID to set the reuseIdentifier (generally the class name of UITableViewCell is used ). When UITableView requires dataSource to return UITableViewCell, it first uses a string to identify the corresponding type of UITableViewCell object in the object pool. If yes, It is reused. If no, this string identifier is passed in to initialize a UITableViewCell object.

 

 

-(UITableViewCell *) tableView :( UITableView *) tableView cellForRowAtIndexPath :( NSIndexPath * NSString * ID = * cell = (cell =

Related Article

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.