Reputation: 1918
I have created new Storyboard Project in Swift and added UINavgationController to initial UIViewController then I changed color of Navigation Bar to black of UINavigationController from storyboard, but when I run the application its showing white color navigation bar.
Please note that I do not want programmatic solution to this issue. I need solution to this issue using storyboard only.
[UPDATE]
this is how I did from storyboard
this is what I get in Simulator:
Any help please?
Thanks
Upvotes: 2
Views: 532
Reputation: 1918
I was using a left sliding menu library that was causing this issue. That library was overriding navigation bar that's why I was seeing white navigation.
Upvotes: 0
Reputation: 3526
I'm not sure what have you done in the storyboard. But this is what you can do to make it work:
UPDATE 1
Another solution would be to use appearance. Keep in mind, it will be applied to all navigation bars in the project.
[[UINavigationBar appearance] setBarTintColor:[UIColor blackColor]];
[[UINavigationBar appearance] setTranslucent:YES];
UPDATE 2
Or
[[UINavigationBar appearance] setBarStyle:UIBarStyleBlack];
[[UINavigationBar appearance] setTranslucent:YES];
UPDATE 3
If you really don't want to write any code, this is what you may do from the storyboard. Here 1
corresponds to UIBarStyleBlack
.
Upvotes: 1
Reputation: 2198
Try setting Bar Tint color to BlackColor and uncheck Translucent.
Upvotes: 0