CollectionView
public class CollectionView : UICollectionView
extension CollectionView: UICollectionViewDataSource
extension CollectionView: UICollectionViewDelegate
extension CollectionView: UICollectionViewDelegateFlowLayout
Undocumented
-
Undocumented
Declaration
Swift
public var data: [[CellDisplayable]]
-
Undocumented
Declaration
Swift
public init(initialData: [[CellDisplayable]] = [[CellDisplayable]]())
-
Set a new delegate for CollectionView. All modifiers depending on delegate will do nothing after calling that.
Declaration
Swift
@discardableResult func set(delegateTo delegate: UICollectionViewDelegate) -> Self
-
Set a new delegate for CollectionView. All modifiers depending on data source will do nothing after calling that.
Declaration
Swift
@discardableResult func set(dataSourceTo dataSource: UICollectionViewDataSource) -> Self
-
Set a new layout for collection view.
Declaration
Swift
@discardableResult func set(layout: UICollectionViewLayout) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func update( shouldReloadData: Bool = false, _ closure: ([[CellDisplayable]]) -> [[CellDisplayable]] ) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func append( shouldReloadData: Bool = false, _ closure: () -> [[CellDisplayable]] ) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func prefetchingEnabled(_ bool: Bool) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func prefetchDataSource(_ prefetchDataSource: () -> (UICollectionViewDataSourcePrefetching)) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func register(cells: [CollectionViewCell.Type]) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func insertItems(at indexPaths: [IndexPath]) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func insertItem(at indexPath: IndexPath) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func moveItem(at sourceIndexPath: IndexPath, to targetIndexPath: IndexPath) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func moveItems(at sourceIndexPaths: [IndexPath], to targetIndexPaths: [IndexPath]) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func deleteItem(at indexPath: IndexPath) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func deleteItems(at indexPaths: [IndexPath]) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func scrollToItem( at indexPath: IndexPath, at position: UICollectionView.ScrollPosition, animated: Bool = true ) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func allowSelection(_ bool: Bool, multiple: Bool = false) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func selectItem( at indexPath: IndexPath, animated: Bool, scrollPosition: UICollectionView.ScrollPosition ) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func deselectItem(at indexPath: IndexPath, animated: Bool) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func insertSections(at indexSet: IndexSet) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func moveSection(from section: Int, to newSection: Int) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func deleteSections(at sections: IndexSet) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func set(backgroundView : UIView) -> Self
-
Declaration
Swift
@discardableResult func setNumberOfItemsInSection(handler: @escaping ((UICollectionView, Int) -> Int)) -> Self
Parameters
handler
Contains actually declared collection view and given section, expects to return number of items for given section.
-
Undocumented
Declaration
Swift
@discardableResult func configureCell(handler: @escaping ((UICollectionView, IndexPath) -> UICollectionViewCell)) -> Self
-
Set index titles for CollectionView
Declaration
Swift
@discardableResult func setSectionTitles(shouldReloadData: Bool = false, to array: [String]) -> Self
Parameters
array
Used to provide titles for Collection View, order used is the same as the order of parameter.
-
Undocumented
Declaration
Swift
public func numberOfSections(in collectionView: UICollectionView) -> Int
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
-
Undocumented
Declaration
Swift
public func indexTitles(for collectionView: UICollectionView) -> [String]?
-
Undocumented
Declaration
Swift
public func collectionView( _ collectionView: UICollectionView, indexPathForIndexTitle title: String, at index: Int ) -> IndexPath
-
Undocumented
Declaration
Swift
@discardableResult func shouldSelectItem(_ handler: @escaping ((IndexPath) -> Bool)) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func didSelectItemAt(_ handler: @escaping ((IndexPath) -> ())) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func shouldDeselectItemAt(_ handler: @escaping ((IndexPath) -> Bool)) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func didDeselectItemAt(_ handler: @escaping ((IndexPath) -> ())) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func shouldBeginMultipleSelectionInteractionAt(_ handler: @escaping ((IndexPath) -> Bool)) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func didBeginMultipleSelectionInteractionAt(_ handler: @escaping ((IndexPath) -> ())) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func didEndMultipleSelectionSelectionInteraction(_ handler: @escaping ((UICollectionView) -> ())) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func shouldHighlightItemAt(_ handler: @escaping ((IndexPath) -> Bool)) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func didHighlightItemAt(_ handler: @escaping ((IndexPath) -> ())) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func didUnhighlightItemAt(_ handler: @escaping ((IndexPath) -> ())) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func willDisplayCellHandlerFor(_ handler: @escaping ((CollectionViewCell, IndexPath) -> ())) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func didEndDisplayingCellFor(_ handler: @escaping ((CollectionViewCell, IndexPath) -> ())) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func transitionLayoutFor(_ handler: @escaping (_ old: UICollectionViewLayout, _ new: UICollectionViewLayout) -> UICollectionViewTransitionLayout) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func targetContentOffsetFor(_ handler: @escaping (_ proposed: CGPoint) -> CGPoint) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func targetIndexPathForMove(_ handler: @escaping (_ from: IndexPath, _ to: IndexPath) -> IndexPath) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func canFocusItemAt(_ handler: @escaping (IndexPath) -> Bool) -> Self
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath)
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, shouldDeselectItemAt indexPath: IndexPath) -> Bool
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath)
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, shouldBeginMultipleSelectionInteractionAt indexPath: IndexPath) -> Bool
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, didBeginMultipleSelectionInteractionAt indexPath: IndexPath)
-
Undocumented
Declaration
Swift
public func collectionViewDidEndMultipleSelectionInteraction(_ collectionView: UICollectionView)
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, didHighlightItemAt indexPath: IndexPath)
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, didUnhighlightItemAt indexPath: IndexPath)
-
Undocumented
Declaration
Swift
public func collectionView( _ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath )
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath)
-
Undocumented
Declaration
Swift
public func collectionView( _ collectionView: UICollectionView, transitionLayoutForOldLayout fromLayout: UICollectionViewLayout, newLayout toLayout: UICollectionViewLayout ) -> UICollectionViewTransitionLayout
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, targetContentOffsetForProposedContentOffset proposedContentOffset: CGPoint) -> CGPoint
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, targetIndexPathForMoveFromItemAt originalIndexPath: IndexPath, toProposedIndexPath proposedIndexPath: IndexPath) -> IndexPath
-
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, canFocusItemAt indexPath: IndexPath) -> Bool
-
Undocumented
Declaration
Swift
@discardableResult func layoutSizeForItem(_ handler: @escaping ((UICollectionViewLayout, IndexPath) -> CGSize)) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func sectionInsets(shouldUpdate: Bool = true, insets: [UIEdgeInsets]) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func minimumLineSpacing(shouldUpdate: Bool = true, forSections spacings: [CGFloat]) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func minimumInteritemSpacing(shouldUpdate: Bool = true, forSections spacings: [CGFloat]) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func headerSize(shouldUpdate: Bool = true, forSections sizes: [CGSize]) -> Self
-
Undocumented
Declaration
Swift
@discardableResult func footerSize(shouldUpdate: Bool = true, forSections sizes: [CGSize]) -> Self
-
Undocumented
Declaration
Swift
public func collectionView( _ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath ) -> CGSize
-
Undocumented
Declaration
Swift
public func collectionView( _ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int ) -> UIEdgeInsets
-
Undocumented
Declaration
Swift
public func collectionView( _ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int ) -> CGFloat
-
Undocumented
Declaration
Swift
public func collectionView( _ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int ) -> CGFloat
-
Undocumented
Declaration
Swift
public func collectionView( _ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int ) -> CGSize
-
Undocumented
Declaration
Swift
public func collectionView( _ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForFooterInSection section: Int ) -> CGSize