0

I try to hide my cell id in the match @ "56eae83ae3c9a04d398b4582", it works fine except that when I scroll I have other cell of my UICollectionView hiding, an idea? Thank you

cell.statusContest.text = [searchResult objectForKey:@"id"];

                if ([cell.statusContest.text isEqualToString:@"56eae83ae3c9a04d398b4582"]) {
                    cell.hidden = YES;
                }
victor bill
  • 209
  • 2
  • 15

1 Answers1

1

You can try to write cell.hidden = NO; in cell class method prepareForReuse

You need go to your cell class (CellClass.m or CellClass.swift) if you using custom cell, or just create your own CellClass and add code below. Also check your cell in storyboard, it must use this class.

Objective-C

- (void)prepareForReuse {
    // Reset your data
    self.hidden = NO;
}

Swift

override func prepareForReuse() {
    // Reset your data
    self.hidden = false
}
Mudriy Ilya
  • 122
  • 2
  • 11