【发布时间】:2015-10-14 18:08:27
【问题描述】:
我目前有一个自定义 UICollectionViewCell,我在其中覆盖 setSelected:。头文件状态:The collection view may call the setters inside an animation block. 选择正在动画,但我不想要动画。
我尝试通过以下方式禁用动画:
[UIView performWithoutAnimation:^{
self.label.font = font;
}];
还有+[UIView setAnimationsEnabled:],但动画仍然存在。
我的猜测是字体更改本身不是动画的,但它会触发布局传递,因为标签现在更大了。有没有办法禁用单元格的布局?
【问题讨论】:
标签: ios animation uicollectionview uicollectionviewcell selected