Reputation: 7762
I have a View controller
with AVCaptureSession
to scan barcode. I picked code here. I added navigation bar to it. But time, battery life, etc. didn't show.
I tried with UINavigation controller and NavigationBar widget.
Upvotes: 0
Views: 135
Reputation: 7031
You're most likely not showing the UIStatusBar
, try adding this to your ViewController:
override func prefersStatusBarHidden() -> Bool {
return false
}
override func preferredStatusBarStyle() -> UIStatusBarStyle {
return .Default
}
Another option is setting values for status bar attributes in your main property list file:
Status bar style
defines the style of your status bar, see UIStatusBarStyle
for what option you have.
View controller-based status bar appearance
defines whether you want to have different styles for each view controller or one style for all view controllers.
Upvotes: 2