I use an UITableViewController
into a Navigation Controller
that comes up when an UIButton
pressed. When the button has been pressed the TableViewController
comes up without status bar. If i select a cell of the TableViewController
and then getBack the Status Bar appears properly. I don't know the reason that this happens. I want the Status Bar to appear every time. I tried to set Status Bar from StoryBoard but it did't work. I also tried a lot of solutions programmatically from here.
This is the part of Storyboard that shows the TableViewController
and the options that have been selected.
This is the wrong result:
If I select a cell and get back to the TableViewController
I have this result:
I want to have the result of third pic every time.
P.S. In my .plist file I have View controller-based status bar appearance set to YES.
I have added to my viewDidLoad
this Line:
[self setNeedsStatusBarAppearanceUpdate];
And below of viewDidLoad
this method:
-(UIStatusBarStyle)preferredStatusBarStyle{
return UIStatusBarStyleLightContent;
}
And it shows only the battery life.