我试图在服装单元格中添加此UIView,并且在滚动时发生奇怪的事情,例如复制视图,视图正在更改大小,移动等。 。将UIView添加到UICollectionView中的单元格中,导致轻弹
我试图将视图添加到服装的细胞,同时也给此方法:
-(UICollectionViewCell*)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
两个结果在弹和奇怪的问题,同时向下滚动。
我检查之前,我补充这样的观点:
#define LABEL_TAG 100001
UIView *isstrip = (UIView*)[self.contentView viewWithTag:LABEL_TAG];
if(!isstrip)
{
UIView *strip=[[UIView alloc] initWithFrame:CGRectMake(0, self.frame.size.height- [Globals sharedGlobals].gridViewStripHeight, self.frame.size.width,
[Globals sharedGlobals].gridViewStripHeight)];
strip.tag=LABEL_TAG;
strip.backgroundColor=[UIColor greenColor];
[self.contentView addSubview:strip];
}
单元的高度不固定,不应该固定。 。 。当然这种观点适合细胞,我可以看到它和它的瑕疵 – Curnelious