1.错误提示:[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused
代码(分返回空的Cell):
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
UICollectionViewCell * cell = nil;
SelectCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"SelectContactsViewCell" forIndexPath:indexPath];
EMGroup * group = self.myDataSource[indexPath.row];
cell.lable.text = group.groupSubject;
cell.imageview.image =[UIImage imageNamed:@"communityspace.png"];
//忘记赋值了
return cell;
}
2.[superView addSubView:childView]
当superView.frame = CGRectZero;childView!= CGRectZero 该死的childView一直显示着,误打误撞设置了下superView.clipsToBounds =YES;