iOS core note--uicollectionview-layout objects

Source: Internet
Author: User

iOS core note--uicollectionview-Layout object 1, Uicollectionview Layout object: 1-1, Uicollectionviewlayout:

?了解: 1, uicollectionviewlayout no itemsize attribute, and the size of CollectionView cell cannot be 0 or less than 0; Typically CollectionView uses its subclasses uicollectionviewflowlayout layout cell.

?了解: 2. All the methods that the layout may use are declared in Uicollectionviewlayout.

?重要: 3, UICollectionViewController when used, the layout object is UICollectionViewController flow direction UICollectionView , so, the final decision CollectionView layout is the controller layout object, even if modify CollectionView layout object can not change the layout of CollectionView Because, at this point, the layout of the CollectionView is determined by the controller's layout object.

1-2, Uicollectionviewflowlayout:

?了解: 1. All the attributes that the layout may use are declared, and the layout methods are all inherited from the parent class.

2, Uicollectionviewflowlayout properties: 2-1, set CollectionView scroll direction:

?了解: 1. Change the rolling direction of the CollectionView, with which the reference coordinate system with minimum row spacing and minimum column spacing changes.

?了解: 2, CollectionView direction value:

2-2. Set the minimum line spacing for cell in CollectionView:

?了解: The reference direction varies with the collectionview direction of the scroll.

2-3. Set the minimum column spacing for cell in CollectionView:

?了解: The reference direction varies with the collectionview direction of the scroll.

2-4. Set the real size of the cell in CollectionView:

2-5. Set the estimated size of the cell in CollectionView:

2-6, set the CollectionView group head, tail view type:

2-7. Set CollectionView head View size:

2-8. Set the CollectionView tail view size:

2-9. Set the inner margin of each group of CollectionView:

iOS Core Notes--uicollectionview-layout objects

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.