I am porting an ios6 application to ios7 sdk (with Xcode 5 and mavericks) and I tried changing the color of the UIBarButtonItem, here is what I am trying to do:
self.navigationController.navigationBar.tintColor
- change color for panel, but not for elements
[[UINavigationBar appearance] setTintColor:[UIColor greenColor]]; [[UIBarButtonItem appearance] setTintColor:[UIColor greenColor]];
- does not work, same wrong color
self.navigationItem.rightBarButtonItem.tintColor = [UIColor greenColor]; self.navigationItem.leftBarButtonItem.tintColor = [UIColor greenColor];
- does not work, same wrong color
UIBarButtonItem *close = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Close",@"") style:UIBarButtonItemStyleDone target:self action:@selector(closeAddressBook:)]; close.tintColor = [UIColor greenColor];
- does not work, same wrong color
for self.filterSegment.tintColor = [UIColor greenColor] where UISegmentedControl *filterSegment;
I see an unselected segment with the correct color, but the selected segment has the same wrong color.
any ideas?
iphone
user170317
source share