UICollectionView
class UICollectionView : UIScrollView, UIDataSourceTranslating
-
The center point of
UICollectionViewDeclaration
Swift
public var centerPoint: CGPoint { get } -
Set a
UIRefreshControlDeclaration
Swift
@available(iOS 10.0, *) @discardableResult public func setRefreshControl(_ target: Any?, with action: Selector, tintColor: UIColor = .white) -> UIRefreshControlParameters
targetAny?
actionThe selector action with swipe
tintColorthe activity indicator tintColor. default = .white
Return Value
@discardableResultUIRefreshControlwhich was assigne toUICollectionView -
Register
UICollectionReusableView.Type‘sSee also
Declaration
Swift
public func register(headerTypes: UICollectionReusableView.Type...)Parameters
headerTypesUICollectionViewCell.Type‘s -
Register
UICollectionReusableView.TypeSee also
Declaration
Swift
public func register(headerType: UICollectionReusableView.Type)Parameters
headerTypeUICollectionReusableView.Type
-
Register
UICollectionViewCell.Type‘sSee also
Declaration
Swift
public func register(cellTypes: UICollectionViewCell.Type...)Parameters
cellTypesUICollectionViewCell.Type‘s -
Register
UICollectionViewCell.TypeSee also
Declaration
Swift
public func register(cellType: UICollectionViewCell.Type)Parameters
cellTypeUICollectionViewCell.Type
-
Dequeue generic type
elementofUICollectionViewCellforindexPathDeclaration
Swift
public func dequeue<Element>(cellType: Element.Type, for indexPath: IndexPath) -> Element where Element : UICollectionViewCellParameters
cellTypeElement.Type
indexPathcell for
IndexPath -
Dequeue header generic type
elementofUICollectionReusableViewforindexPathDeclaration
Swift
public func dequeueHeader<Element>(cellType: Element.Type, for indexPath: IndexPath) -> Element where Element : UICollectionReusableViewParameters
cellTypeElement.Type
indexPathheader for
IndexPath -
setAutomaticSize will set the estimated item size as
UICollectionViewFlowLayoutAutomaticSizeSince
First available in iOS 10.0Declaration
Swift
@available(iOS 10.0, *) public func setAutomaticSize(_ height: CGFloat = 250) -
Set minimum line and interitem spacing
Declaration
Swift
public func set(spacing: CGFloat)Parameters
spacingThe minimum spacing
View on GitHub
UICollectionView Extension Reference