UICollectionView
class UICollectionView : UIScrollView, UIDataSourceTranslating
-
The center point of
UICollectionView
Declaration
Swift
public var centerPoint: CGPoint { get }
-
Set a
UIRefreshControl
Declaration
Swift
@available(iOS 10.0, *) @discardableResult public func setRefreshControl(_ target: Any?, with action: Selector, tintColor: UIColor = .white) -> UIRefreshControl
Parameters
target
Any?
action
The selector action with swipe
tintColor
the activity indicator tintColor. default = .white
Return Value
@discardableResult
UIRefreshControl
which was assigne toUICollectionView
-
Register
UICollectionReusableView.Type
‘sSee also
Declaration
Swift
public func register(headerTypes: UICollectionReusableView.Type...)
Parameters
headerTypes
UICollectionViewCell.Type
‘s -
Register
UICollectionReusableView.Type
See also
Declaration
Swift
public func register(headerType: UICollectionReusableView.Type)
Parameters
headerType
UICollectionReusableView.Type
-
Register
UICollectionViewCell.Type
‘sSee also
Declaration
Swift
public func register(cellTypes: UICollectionViewCell.Type...)
Parameters
cellTypes
UICollectionViewCell.Type
‘s -
Register
UICollectionViewCell.Type
See also
Declaration
Swift
public func register(cellType: UICollectionViewCell.Type)
Parameters
cellType
UICollectionViewCell.Type
-
Dequeue generic type
element
ofUICollectionViewCell
forindexPath
Declaration
Swift
public func dequeue<Element>(cellType: Element.Type, for indexPath: IndexPath) -> Element where Element : UICollectionViewCell
Parameters
cellType
Element.Type
indexPath
cell for
IndexPath
-
Dequeue header generic type
element
ofUICollectionReusableView
forindexPath
Declaration
Swift
public func dequeueHeader<Element>(cellType: Element.Type, for indexPath: IndexPath) -> Element where Element : UICollectionReusableView
Parameters
cellType
Element.Type
indexPath
header for
IndexPath
-
setAutomaticSize will set the estimated item size as
UICollectionViewFlowLayoutAutomaticSize
Since
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
spacing
The minimum spacing