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