UITableView单元格中的图像不支持tintColor [英] Images in UITableView cells are not honoring tintColor

查看:161
本文介绍了UITableView单元格中的图像不支持tintColor的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个UITableView,它由静态单元格组成.在IB中,我将每个UITableViewCell的样式都设置为基本",并设置了图像(请参见屏幕截图).我的导航栏中的按钮支持tintColor属性,但表视图中的图像不支持.到目前为止,我已经完成了IB的所有工作-如果我也希望图像也使用tintColor属性,是否必须使用代码?

I have a UITableView which is comprised of static cells. In IB I've set each UITableViewCell's style to "Basic" and set an image (see screenshot). The buttons in my nav bar honor the tintColor property but the images in the tableview do not. Thus far I've done everything in IB - do I have to use code if I want the images to honor the tintColor property too?

谢谢

推荐答案

在iOS7 +上,每个UIImageView都具有属性tintColor

Every UIImageView has the property tintColor on iOS7+

尝试在情节提要User Defined Runtime Attributes

这篇关于UITableView单元格中的图像不支持tintColor的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆