user
user

Reputation: 21

How to hide Status Bar on iPad?

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

Answers (3)

Zouhair Sassi
Zouhair Sassi

Reputation: 1411

Objective C:

- (BOOL)prefersStatusBarHidden{
 return YES;
}

Swift 4:

override var prefersStatusBarHidden: Bool {
 return true
}

Upvotes: 4

AZZ
AZZ

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

Ketan Parmar
Ketan Parmar

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

enter image description here

screenshot reference : this so answer, you can refer this post also btw.

Upvotes: 4

Related Questions