【发布时间】:2015-12-21 22:54:33
【问题描述】:
在我的 UICollectionView 中向下滚动时,它会滞后,这是由以下原因引起的:
imageCell?.backgroundColor = UIColor.whiteColor()
imageCell?.layer.masksToBounds = false
imageCell?.layer.shadowOpacity = 0.5
imageCell?.layer.shadowRadius = 5.0
imageCell?.layer.shadowOffset = CGSizeZero
imageCell?.layer.shadowColor = UIColor.grayColor().CGColor
imageCell 是单元格名称:
let imageCell = collectionView.dequeueReusableCellWithReuseIdentifier("imageCell", forIndexPath: indexPath) as? CollectionViewCell
有什么建议吗?
【问题讨论】:
-
您是在 Interface Builder 中创建了一个标识符为 imageCell 的单元格,还是全部在代码中完成?
-
@Jay 单元格是在 Interface Builder 中创建的,是的。
-
您找到解决方案了吗?我遇到了类似的问题
-
@JayVDiyk 我删除了阴影。没有阴影看起来也更专业。
标签: ios swift uicollectionview