Skip to content

Instantly share code, notes, and snippets.

@initFabian
Last active February 18, 2016 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save initFabian/9c61052e66891dc48d5a to your computer and use it in GitHub Desktop.
Save initFabian/9c61052e66891dc48d5a to your computer and use it in GitHub Desktop.
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath:NSIndexPath)->UICollectionViewCell
{
var cell = collectionView.dequeueReusableCellWithReuseIdentifier("CELL", forIndexPath: indexPath) as CollectionCell
//using titleLabel as an example
if (_cell.titleLabel != nil) {
print("cell being reused")
} else {
// ....
cell.titleLabel.text="cellText"
}
return cell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment