Instance Method

visibleSupplementaryViews(ofKind:)

Returns an array of the visible supplementary views of the specified kind.

Declaration

func visibleSupplementaryViews(ofKind elementKind: String) -> [UICollectionReusableView]

Parameters

elementKind

The kind of supplementary view to locate. This value is defined by the layout object. This parameter must not be nil.

Return Value

An array of the visible supplementary views. If no supplementary views are visible, the returned array is empty.

See Also

Locating Items and Views in the Collection View

func indexPathForItem(at: CGPoint) -> IndexPath?

Returns the index path of the item at the specified point in the collection view.

var indexPathsForVisibleItems: [IndexPath]

An array of the visible items in the collection view.

func indexPath(for: UICollectionViewCell) -> IndexPath?

Returns the index path of the specified cell.

func cellForItem(at: IndexPath) -> UICollectionViewCell?

Returns the visible cell object at the specified index path.

func indexPathsForVisibleSupplementaryElements(ofKind: String) -> [IndexPath]

Returns the index paths of all visible supplementary views of the specified type.