To completely hide it on the home screen, open up an app, such as Settings, and wait about three to four seconds. Press the home button again, and the status bar will be completely gone.
Here are the steps to follow to get a customized emoji/icon in your iPhone's status bar. Launch the Settings app. Scroll down and tap Focus. Tap the + button in the top-right corner of the screen.
You should add this value to plist: "View controller-based status bar appearance" and set it to "NO".
Add the following to your Info.plist:
<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
Add following line in viewdidload
[[UIApplication sharedApplication] setStatusBarHidden:YES
withAnimation:UIStatusBarAnimationFade];
and add new method
- (BOOL)prefersStatusBarHidden {
return YES;
}
also change info.plist file View controller-based status bar appearance" = NO
its works for me
In the Plist add the following properties.
Status bar is initially hidden = YES
View controller-based status bar appearance = NO
now the status bar will hidden.
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated]
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated]
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
}
override func viewWillAppear(animated: Bool)
{
super.viewWillAppear(animated)
UIApplication.sharedApplication().setStatusBarHidden(true, withAnimation: UIStatusBarAnimation.None)
}
override func viewWillDisappear(animated: Bool)
{
super.viewWillDisappear(animated)
UIApplication.sharedApplication().setStatusBarHidden(false, withAnimation: UIStatusBarAnimation.None)
}
I did the following and it seems to work (even in iOS 8):
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
}
- (BOOL)prefersStatusBarHidden {
return YES;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With