title: UICollectionview changes selection/disabling selection while scrolling - iOS
body: <p>I'm populating data on uicollectionview cell and selecting and deselecting, everything works perfect but when I start scrolling sometime selection is not there sometimes selection changing with the cell. Below is the code, help much appreciated.</p>
  
  <pre><code>- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
  
        cell = (BYOCollectionCell *)[collectionView dequeueReusableCellWithReuseIdentifier:@"CVCCell" forIndexPath:indexPath];
        cell.vSelectionView.hidden = YES;
        cell.vSelectionView.backgroundColor = customLightGreenColor;
        [self makeRoundElement:cell.vSelectionView forLabel:nil withCorner:8.0f withBorder:0];
  
        pizzaInfo *pizzainfo= [[pizzaInfo alloc]init];
        pizzainfo = [_lstDishCollection objectAtIndex: indexPath.row];  
        if (pizzainfo._bIsSelected)
        {
             cell.vSelectionView.hidden = NO;
        }
        else
        {
             cell.vSelectionView.hidden = YES;
        }
        //label customization 
        return cell;
   }
  </code></pre>
  
  <p><strong>DidselectItem</strong> </p>
  
  <pre><code>- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
  {
        cell = (BYOCollectionCell *)[collectionView dequeueReusableCellWithReuseIdentifier:@"CVCCell" forIndexPath:indexPath];
        pizzaInfo *pizzaInfoCellData = [_lstDishCollection objectAtIndex: indexPath.row];
        byoPizzaInfo = [_lstDishCollection objectAtIndex:indexPath.row];
        if ( pizzaInfoCellData._bIsSelected)
        {       
             cell.vSelectionView.hidden = NO;
             pizzaInfoCellData._bIsSelected = NO;
             [self._byodelegate deltaDeSelection:pizzaInfoCellData];
        }
        else
        {
             cell.vSelectionView.hidden = YES;
             pizzaInfoCellData._bIsSelected = YES;
             // deltaSelection:(pizzaInfo *)selectedItem
             [self._byodelegate deltaSelection:pizzaInfoCellData];
             if (self._IsNotifiable) {            
                  [self showView];            
             }
        }
        [_vCVC reloadData];
   }
  </code></pre>
  
  <p>More over <code>collectionViewCell</code> is inside <code>tableViewCell.</code></p>