Skip to content

Instantly share code, notes, and snippets.

@wess
Created January 21, 2016 19:55
Show Gist options
  • Save wess/7d2fef8e6f1622036323 to your computer and use it in GitHub Desktop.
Save wess/7d2fef8e6f1622036323 to your computer and use it in GitHub Desktop.
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
guard let charge = charges[indexPath.item] as Charge else { fatalError("Invalid index") }
guard let cell = collectionView.dequeueReusableCellWithReuseIdentifier(CellIdentifier, forIndexPath: indexPath) as? ChargeKeypadCell else { fatalError("Invalid Cell for charge view") }
cell.charge = charge
return cell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment