Created
November 1, 2014 00:50
-
-
Save kevinvavelin/a86ff0f8d5dfc6388da6 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
override func viewDidLoad() { | |
super.viewDidLoad() | |
var collectionViewFlowLayout = UICollectionViewFlowLayout() | |
twitterCardCollectionView = UICollectionView(frame:CGRectMake(0, 0, self.view.frame.size.width,self.view.frame.size.height), collectionViewLayout: collectionViewFlowLayout) | |
twitterCardCollectionView.registerClass(MultipleCardCollectionViewCell.self, forCellWithReuseIdentifier: "account") | |
twitterCardCollectionView.delegate = self | |
twitterCardCollectionView.dataSource = self | |
twitterCardCollectionView.backgroundColor = UIColor.clearColor() | |
self.view.addSubview(twitterCardCollectionView) | |
} | |
// Crash appears exactly here | |
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { | |
let cell = collectionView.dequeueReusableCellWithReuseIdentifier("account", forIndexPath: indexPath) as MultipleCardCollectionViewCell | |
//A lot of configuration after | |
return cell | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment