Dimming a tintColor on a UITableViewCell

坚强是说给别人听的谎言 提交于 2019-12-11 05:27:49

问题


Here is a UITableViewCell that opens a modal ('Add Ingredients'):

I am setting the label color to match the application's tintColor:

cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
cell.textLabel.text = @"Add Ingredients...";
cell.textLabel.textColor = [self.view tintColor];

How do I dim the text color when a UIAlertView or UIActionSheet is presented? This behavior is default for buttons and other controls, but not for a cell's text label.

I have found references to tintAdjustmentMode and tintColorDidChange, but do not know how to use either.

Or should I be adding a button to my cell? My previous experience with this approach wasn't optimal - there were side-efffects with responsiveness.


回答1:


I believe you are correct. You should just be able to override the tintColorDidChange method in your CustomUITableViewCell.

http://www.qubop.com/ios7.pdf



来源:https://stackoverflow.com/questions/18855080/dimming-a-tintcolor-on-a-uitableviewcell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!