Created
July 7, 2018 21:37
-
-
Save EricADockery/b143d0c488c90a8a6ad905941bae720d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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