问题
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