UICollectionView

class UICollectionView : UIScrollView, UIDataSourceTranslating
  • Initiates a layout pass of UICollectionView and its items. Necessary for calculating new cell heights and animations when the internal state of a cell changes and needs to reflect them immediately.

    Declaration

    Swift

    public func render()
  • Deselects the previously selected row, with an option to animate the deselection.

    Declaration

    Swift

    public func deselectLastSelectedItem(animated: Bool)

    Parameters

    animated

    true to animate the deselection, or false if the change should be immediate.

  • Find the IndexPath for a particular view. Returns nil if the view is not an instance of, or a subview of UICollectionViewCell, or if that cell is not a child of self

    Declaration

    Swift

    public func indexPath(for view: UIView) -> IndexPath?

    Parameters

    view

    The view to find the IndexPath.

    Return Value

    The IndexPath of the view in the UICollectionView or nil if it could not be found.