October 2018
Beginner
750 pages
19h 11m
English
A collection view uses the collectionViewContentSize property from its layout to figure out the size of its contents. This property is especially important because it is used to configure and display the scrolling indicators for the collection view. It also provides the collection view with information about the direction in which scrolling should be enabled.
Implementing this property uses the number of rows and columns in the collection view. It also takes the item size and item spacing into account to come up with the size of all of its contents together. Add the following implementation for collectionViewContentSize:
override var collectionViewContentSize: CGSize { let width = CGFloat(numberOfColumns) ...Read now
Unlock full access