How to handle Custombutton CheckedAnduncheck functionality in collectionviewcell in objective c with multiselection
<p>I want collectionview cell in which i placed custom button checkboxes used for adding member to the group.multiselection is also possible.but when i select particular checkbox alongwith it the other checkbox which is not visible is also selected which is at same indexpath from lastvisible cell below is my code 
`</p>

<pre><code>- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
 CGCell *cell = [_CGCol dequeueReusableCellWithReuseIdentifier:@"CELL" forIndexPath:indexPath];
[cell.btn addTarget:self action:@selector(CheckUncheckFunctionality:) forControlEvents:UIControlEventTouchUpInside];
    cell.btn.tag = indexPath.row;
return cell;
}
-(void)CheckUncheckFunctionality:(id)sender
{
    UIButton *btn = (UIButton *)sender;
    if (btn.selected) {
      [btn setImage:[UIImage imageNamed:@"unchacked.png"] forState:UIControlStateNormal];
    }
    else{
        [btn setImage:[UIImage imageNamed:@"checked.png"] forState:UIControlStateNormal];
    }
}
</code></pre>

<p>`</p>