Reputation: 21
In my project I able to hide status bar on iPhone.
But it doesn’t work for my iPad How can I hide Status Bar on my iPad?
Upvotes: 1
Views: 3007
Reputation: 1411
Objective C:
- (BOOL)prefersStatusBarHidden{
return YES;
}
Swift 4:
override var prefersStatusBarHidden: Bool {
return true
}
Upvotes: 4
Reputation: 55
I have the same question, and I have set info.plist with what Charlie Fish showed, but it's not help.
I fixed by changing TARGETS->Deployment info->Devices to iPad, then run Xcode.
Upvotes: 0
Reputation: 27448
you should override the method,
-(BOOL)prefersStatusBarHidden{
return YES;
}
in every viewcontroller
if you have not making setting in info.plist
for hiding it.
if you want to manage in info.plist
then,
<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
You can check the screenshot below
screenshot reference : this so answer, you can refer this post also btw.
Upvotes: 4