Skip to content

Instantly share code, notes, and snippets.

@EricADockery
Created July 7, 2018 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EricADockery/b143d0c488c90a8a6ad905941bae720d to your computer and use it in GitHub Desktop.
Save EricADockery/b143d0c488c90a8a6ad905941bae720d to your computer and use it in GitHub Desktop.
//
// TopMostViewController.swift
// iTunesFeatureBanner
//
// Created by Eric Dockery on 7/7/18.
// Copyright © 2018 Eric Dockery. All rights reserved.
//
import UIKit
class TopMostViewController: UIViewController {
let presenter = TopMostPresenter()
override func viewDidLoad() {
super.viewDidLoad()
presenter.buildFeatureCellData()
}
}
extension TopMostViewController: UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return 1
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "TopMostCollectionViewCell", for: indexPath) as! TopMostCollectionViewCell
guard let fighterData = presenter.builtFeatureCellData else {
return cell
}
cell.build(fighters: fighterData)
return cell
}
}
extension TopMostViewController: UICollectionViewDelegate {
func collectionView(_ collectionView: UICollectionView, canFocusItemAt indexPath: IndexPath) -> Bool {
return false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment