Instance Method

indexPathsForVisibleSupplementaryElements(ofKind:)

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

Declaration

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

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 NSIndexPath objects, each of which corresponds to a visible supplementary view in the collection view. If there are no visible supplementary views, this method returns an empty array.

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 visibleSupplementaryViews(ofKind: String) -> [UICollectionReusableView]

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