调暗UITableViewCell上的tintColor
这是一个UITableViewCell,打开一个模式('添加成分'):
我将标签颜色设置为匹配应用程序的tintColor:
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; cell.textLabel.text = @"Add Ingredients..."; cell.textLabel.textColor = [self.view tintColor];
如何在显示UIAlertView
或UIActionSheet
时调暗文字颜色? 此行为是button和其他控件的默认值,但不是单元格的文本标签。
我发现了tintAdjustmentMode和tintColorDidChange的引用,但不知道如何使用。
或者我应该添加一个button到我的手机? 我以前使用这种方法的经验并不是最佳 – 有响应的副作用。
我相信你是对的。 你应该能够重写CustomUITableViewCell中的tintColorDidChange方法。