I've created a UINavigationBar in IB. But don't see any way to set the button colors... so I do this with code:
for(id subView in navBar.subviews)
if( [subView isKindOfClass:[UIButton class]] )
{
UIBarButtonItem *b = (UIBarButtonItem *)subView;
if( [b.title isEqualToString:@"Cancel"] ) [b setTintColor:[UIColor redColor]];
if( [b.title isEqualToString:@"Save" ] ) [b setTintColor:[UIColor greenColor]];
}
It appears to work... but gives 2 warnings about it not responding to setTintColor.
Is there a better (and fully legal) way to do that?