我认为这是苹果改变色调的方式的缺陷:
这是我正在使用的代码:
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(dismiss)];
self.navigationItem.leftBarButtonItem.tintColor = [UIColor whiteColor];然后,按一下按钮:
[UIView animateWithDuration:1 animations:^{
self.navigationItem.leftBarButtonItem.tintColor = nil;
}];不管我把什么颜色放在那里,效果都一样。
不期望的效果
发布于 2015-11-27 08:37:39
你试过为不同的状态设置颜色吗?
[[theNavigationBar.subviews objectAtIndex:1] setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
[[theNavigationBar.subviews objectAtIndex:2] setTitleColor:[UIColor redColor] forState:UIControlStateNormal];https://stackoverflow.com/questions/33953203
复制相似问题