CollectionViewController
open class CollectionViewController : NSViewController, CollectionViewDataSource, CollectionViewDelegate
The UICollectionViewController class represents a view controller whose content consists of a collection view.
-
Declaration
Swift
open func numberOfSections(in collectionView: CollectionView) -> Int
-
Declaration
Swift
open func collectionView(_ collectionView: CollectionView, numberOfItemsInSection section: Int) -> Int
-
Declaration
Swift
open func collectionView(_ collectionView: CollectionView, cellForItemAt indexPath: IndexPath) -> CollectionViewCell
-
Adjust the layout constraints for the collection view
Declaration
Swift
open func adjustContentInsets(_ insets: NSEdgeInsets)
Parameters
insets
The insets to apply to the collection view
-
Adjust the constraints for the collection view
Declaration
Swift
open func adjustConstraint(_ attribute: NSLayoutConstraint.Attribute, value: CGFloat?)
Parameters
attribute
The layout attribute to adjust. Must be .Top, .Right, .Bottom, or .Left
value
The constant to apply to the constraint