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