In the case below, there are two UIImageViews with the same settings and the same template image... But one tints the image, and one does not
我复制了working UIImageView,并将其替换为另一个,结果成功了.这种情况在我身上发生过多次,这个解决方案一直有效,但我仍然想知道我做错了什么?这可能是Xcode错误吗?类似的事情发生在你身上了吗?我有Xcode 8.1.
UIImageView
Easy fix solution:
只需添加一个新的运行时属性,该属性将UIImageView的tintColor设置为指定的 colored颜色 ,并确保图像已着色.
您仍然需要将图像设置为图像中的模板图像.xcassets文件.
这样你就不需要任何额外的出口、扩展或代码行.
Also take note:
重学前端 -〔程劭非(winter)〕
从0开始做增长 -〔刘津〕
深入拆解Tomcat & Jetty -〔李号双〕
SQL必知必会 -〔陈旸〕
黄勇的OKR实战笔记 -〔黄勇〕
摄影入门课 -〔小麥〕
手机摄影 -〔@随你们去〕
恋爱必修课 -〔李一帆〕
如何读懂一首诗 -〔王天博〕
手把手带你写一个Web框架 -〔叶剑峰〕
李智慧 · 高并发架构实战课 -〔李智慧〕
深入拆解消息队列47讲 -〔许文强〕
无涯教程 - 进程通信教程
无涯教程 - Awk教程
无涯教程 - C#教程
无涯教程 - Python数据结构教程
无涯教程 - SQL教程
无涯教程 - Swift5教程
无涯教程 - Java 代码面试完全指南教程
无涯教程 - TensorFlow2 快速入门教程