There is a label in UICollectionViewCell. I made 6 cells in UICollectionView and assigned a number (1-6) to a label in each cell. I call [UICollectionView reloadData] and expect same number in label. But, a label value is changed when cellForItemAtIndexPathas is called, like "1 3 1 3 1 3". It seems UICollectionViewCell is relocated in cellForItemAtIndexPathas.
Is there any way to keep it?
-(UICollectionViewCell*)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
InfoCollectionViewCell *infoCell = [collectionView dequeueReusableCellWithReuseIdentifier:@"InfoCell" forIndexPath:indexPath];
[infoCell.cellText setText:[infoCell.cellText.text stringByAppendingString:[NSString stringWithFormat:@"%d\n",indexPath.row]]];
return infoCell;
}