I've got an issue with my UICollectionView where my cells are always initiated blank/in a default state with no data.
The data only appears in the cells after scrolling them in and out of view.
Thoughts? Thanks.
CODE:
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellIdentifier = @"EquipmentCell";
APInventoryCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellIdentifier forIndexPath:indexPath];
if (!cell) cell = [[APInventoryCollectionViewCell alloc] init];
//set cell data...
cell.label.text = [arrayOfStrings objectAtIndex:indexPath.row];
return cell;
}