Created
April 8, 2018 02:58
-
-
Save mitulmanish/fbcb4826b43f540efe4e418eb0136fe1 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
class DashboardCollectionViewController: UICollectionViewController { | |
override func viewDidLoad() { | |
collectionView?.register(DashboardCollectionViewCell.self, forCellWithReuseIdentifier: DashboardCollectionViewCell.cellIdentifier) | |
} | |
override func numberOfSections(in collectionView: UICollectionView) -> Int { | |
return 1 | |
} | |
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | |
guard let dashboardCell = collectionView.dequeueReusableCell(withReuseIdentifier: DashboardCollectionViewCell.cellIdentifier, for: indexPath) as? DashboardCollectionViewCell else { fatalError("cell cannot be dequeued") } | |
return dashboardCell | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment