collectionViewContentSize
The width and height of the collection view’s contents.
Declaration
var collectionViewContentSize: NSSize { get }Discussion
This property contains the width and height of all of the collection view’s contents, not just the content that is currently visible. The collection view uses this information to configure its scroll view.
When creating custom layouts, you must reimplement this property and provide the size of the collection view’s contents. It is recommended that you cache the content size and adjust the value when the layout changes or when items are added and removed.
The default value in this property is NSZeroSize.
See Also
Providing Layout Information
layoutAttributesClassprepare()layoutAttributesForElements(in:)layoutAttributesForItem(at:)layoutAttributesForSupplementaryView(ofKind:at:)layoutAttributesForDecorationView(ofKind:at:)layoutAttributesForDropTarget(at:)layoutAttributesForInterItemGap(before:)targetContentOffset(forProposedContentOffset:)targetContentOffset(forProposedContentOffset:withScrollingVelocity:)