【发布时间】:2016-09-12 19:53:25
【问题描述】:
所以我已经坚持了一天左右。点击表格视图单元格时如何更改 UIImage 颜色的颜色?例如,我有一个黑色图像,当我点击一个表格视图单元格时,它会将该图像更改为白色?谢谢!
我尝试使用此代码,但我不知道如何正确实现它!
let theImageView = UIImageView(image: UIImage(named:"foo")!.imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate))
theImageView.tintColor = UIColor.redColor()
【问题讨论】:
-
你知道如何创建自定义tableViewCell吗?
标签: swift xcode uitableview uiimageview uiimage