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
-
View displaying ranking cells
Declaration
Swift
let collectionView: UICollectionView
-
Construction with paging options
Declaration
Swift
init(options: PagingOptions)
Parameters
options
Options
-
Refresh collection view on layout
Declaration
Swift
override func viewWillLayoutSubviews()
-
Handle dependency injection
Declaration
Swift
func inject(list: Checklist, insets: UIEdgeInsets, delegate: RankingsPageVCDelegate)
Parameters
list
Checklist
insets
Edge instets
delegate
RankingsPageVCDelegate
-
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
-
Scrolling notfication
Declaration
Swift
func scrollViewDidScroll(_ scrollView: UIScrollView)
Parameters
scrollView
Scrollee
-
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
-
Tap notification
Declaration
Swift
func tapped(header: RankingHeader)
Parameters
header
Tapped header
-
Expose controls to UI tests
Declaration
Swift
func expose()
-
Expose cell to UI tests
Declaration
Swift
func expose(view: UICollectionView, path: IndexPath, cell: UICollectionViewCell)
Parameters
view
Collection
path
Index path
cell
Cell