Instance Property

collectionViewContentSize

Returns the width and height of the collection view’s contents.

Declaration

var collectionViewContentSize: CGSize { get }

Return Value

The width and height of the collection view’s contents.

Discussion

Subclasses must override this method and use it to return the width and height of the collection view’s content. These values represent the width and height of all the content, not just the content that is currently visible. The collection view uses this information to configure its own content size for scrolling purposes.

The default implementation of this method returns CGSizeZero.

See Also

Getting the Collection View Information

var collectionView: UICollectionView?

The collection view object currently using this layout object.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software