Last active
September 14, 2016 16:21
-
-
Save lugearma/e27d4e6686e1b056c3b66924bc9ff621 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
import UIKit | |
let feedCellId = "feedCellId" | |
class FeedViewController: UICollectionViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
self.collectionView!.backgroundColor = UIColor.whiteColor() | |
self.collectionView?.registerClass(UICollectionViewCell.self, forCellWithReuseIdentifier: feedCellId) | |
} | |
override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | |
return 3 | |
} | |
override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { | |
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(feedCellId, forIndexPath: indexPath) | |
return cell | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment