Setting navigation bar button style for "More" tab in iOS
I cannot seem to change the style for the navigation bar button stye. Here is what I am getting.
I subclassed UINavigationController and did the following:
- (id)initWithRootViewController:(UIViewController *)rootViewController
{
self = [super initWithRootViewController:rootViewController];
if (self)
{
UINavigationBar *navBar = [self navigationBar];
[navBar setBarStyle:UIBarStyleBlack];
[navBar setTintColor:[UIColor blackColor]];
}
return self;
}
I am开发者_开发知识库 running iOS 4.3 and the button is added automatically by the OS when there is more than 4 tabs present in the UITabBarController.
Any suggestions on what I may be doing wrong?
Since the more navigation controller is handled by the OS, this is what you have to do.
[self.tabBarController.moreNavigationController.navigationBar setTintColor:[UIColor blackColor]];
If it's adding that by itself, I think you need to change self.navigationItem or self.navigationController to what you want, not just your custom one?
精彩评论