iOS Core Note--uicollectionview-Auxiliary view

Source: Internet
Author: User

iOS Core Note--uicollectionview-Auxiliary view 1, Uicollectionview auxiliary view:

?了解: The head view and the tail view in the Uicollectionview are all using 注册机制 + 重用机制 to improve the execution efficiency of the program, and the head and tail view types are: UICollectionReusableView . Registering a secondary view uses a string to differentiate whether the registered view is a header or trailer view, with a distinguished string of: UICollectionElementKindSectionHeader ( 头部视图 ), UICollectionElementKindSectionFooter ( 尾部视图 ).

1-1. Use Xib to describe the head view:

1-2, to the head view set reuse identity:

1-3. Register Head View:

?了解: The head and tail views in CollectionView are all using the registration mechanism + reuse mechanism, so you need to register ahead of time when using the Xib file to describe the head view.

1-4. Set head View size:

?了解: 布局对象 Sets the headerReferenceSize size of the footerReferenceSize head and tail view, respectively, of the used properties.

1-5. Return head View in data method:

?了解: In the data source method that returns the secondary view, you need to determine whether you are returning a head view or a trailer view.

iOS Core Note--uicollectionview-Auxiliary view

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.