Subclassing UICollectionViewCell leads to never being selected
问题 I've tried subclassing a UICollectionViewCell and loading from a nib file: - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"DatasetCell" owner:self options:nil]; if ([arrayOfViews count] < 1) { return nil; } if (![[arrayOfViews objectAtIndex:0] isKindOfClass:[UICollectionViewCell class]]) { return nil; } self = [arrayOfViews objectAtIndex:0]; UIView *view = [UIView new]; view.frame = self.frame;