RankingsPageVC

final class RankingsPageVC : UIViewController
extension RankingsPageVC: UICollectionViewDelegateFlowLayout
extension RankingsPageVC: UICollectionViewDataSource
extension RankingsPageVC: RankingHeaderDelegate
extension RankingsPageVC: Exposing
extension RankingsPageVC: CollectionCellExposing

Displays logged in user visit counts

UICollectionViewDelegateFlowLayout

  • Provide header size

    Declaration

    Swift

    func collectionView(_ collectionView: UICollectionView,
                        layout collectionViewLayout: UICollectionViewLayout,
                        referenceSizeForHeaderInSection section: Int) -> CGSize

    Parameters

    collectionView

    Collection

    collectionViewLayout

    Collection layout

    section

    Section index

    Return Value

    Size

  • Provide cell size

    Declaration

    Swift

    func collectionView(_ collectionView: UICollectionView,
                        layout collectionViewLayout: UICollectionViewLayout,
                        sizeForItemAt indexPath: IndexPath) -> CGSize

    Parameters

    collectionView

    Collection

    collectionViewLayout

    Collection layout

    indexPath

    Cell path

    Return Value

    Size

UIScrollViewDelegate

UICollectionViewDataSource

  • Provide header

    Declaration

    Swift

    func collectionView(_ collectionView: UICollectionView,
                        viewForSupplementaryElementOfKind kind: String,
                        at indexPath: IndexPath) -> UICollectionReusableView

    Parameters

    collectionView

    Collection

    kind

    Expect header

    indexPath

    Item path

    Return Value

    RankingHeader

  • Section items count

    Declaration

    Swift

    func collectionView(_ collectionView: UICollectionView,
                        numberOfItemsInSection section: Int) -> Int

    Parameters

    collectionView

    Collection

    section

    Index

    Return Value

    Item count

  • Provide cell

    Declaration

    Swift

    func collectionView(_ collectionView: UICollectionView,
                        cellForItemAt indexPath: IndexPath) -> UICollectionViewCell

    Parameters

    collectionView

    Collection

    indexPath

    Index path

    Return Value

    RankingCell

RankingHeaderDelegate

Exposing

CollectionCellExposing

  • Expose cell to UI tests

    Declaration

    Swift

    func expose(view: UICollectionView,
                path: IndexPath,
                cell: UICollectionViewCell)

    Parameters

    view

    Collection

    path

    Index path

    cell

    Cell