I want to have a UINavigationBar
in the top of my app, just like in the phone app for example, but I don't want to use it with a UINavigationController
, that is, I want to use it as a "standalone" object.
The view controller that will have the UINavigationBar
has its view in a .xib file. I tried to drag an instance of UINavigationBar
from the Object Library and it works fine, but the status bar of the app is still white while the UINavigationBar
is gray. I want the status bar to have the same gray tone, but not the rest of the view.
To show you what I mean, I have two pictures. The first is the phone app. Notice that the status bar and the navigation bar is gray but the background is white.
The following picture is from my app, as you can see the status bar is white (I want it to be gray as well).
I have also tried to use the following code in the view controller.
- (void)viewDidLoad
{
[super viewDidLoad];
self.navigationItem.title = @"Köp ProViva";
}
I tried it both with and without the UINavigationBar
but either no navigation bar shows up or it looks the same as before.
How can I add a UINavigationBar and have the status bar have the same color?
UINavigationBar
is gray. It looks white to me (with black text) – staticVoidManUINavigationBar
in a special way (like the answer by Rushabh). – user3124010