【发布时间】:2017-03-26 22:40:33
【问题描述】:
我在UICollectionViewCell 中有一个UIImageView,而UIImageView 上的图像使用UIImageRenderingModeAlwaysTemplate 渲染模式。
当我单击单元格时,我将更改UImageView 的tintColor,但我发现UIImageView 不会立即重绘。但是,当我单击第二个单元格时,第一个 确实使用其tintColor 进行渲染,而第二个 则没有。
在 Reveal 和 LLDB 中,我发现 tintColor 的设置正确。
如果我在LLDB中手动设置tintColor,它可以正确显示。
【问题讨论】:
-
您是否有机会在辅助线程中进行
tintColor设置?这听起来像是一个问题,您可能在不是主线程的线程中更新 UI ...
标签: ios objective-c