Set text in uicollectionviewcell

ios, objective-c

Solution

`UICollectionViewCell` doesn’t have a default cell style. You have to create a custom `UICollectionViewCell` and add a `UILabel` inside.

Problem

I have created a UIcollectionView and an array with some strings @[@"Item One", "Item Two", @"Item Three"]; In Tableview I would do this: ``` NSString *object = self.titlesArray[indexPath.row]; cell.textLabel.text = object; ``` But I can really not figure out how to do this for Items in UIcollectionView.

Original source

Related problems