如果你想要做的图像着色,看到的UIImage + Tint.m在kballard/MGImageUtilities.如果你想批发颜色替换(例如把图像作为一个轮廓和改变整个颜色以一个平面彩色),看到的UIImage + Tint.m在mattgemmell/MGImageUtilities.
它最新,最简单的方法.
theImageView.image = [theImageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
[theImageView setTintColor:[UIColor redColor]];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12650 次 |
| 最近记录: |