Hide Status Bar from iPhone application

前端 未结 7 647
太阳男子
太阳男子 2020-12-18 14:07

I want my app to not have the status bar at all! I have tried using the .plst

I have tried everything in here Status bar won't disappear and also in here How to

相关标签:
7条回答
  • 2020-12-18 14:15

    iOS 7

    In your Info.plist file add key View controller-based status bar appearance with value NO. And, add key Status bar is initially hidden with value YES.

    0 讨论(0)
  • 2020-12-18 14:15

    Have you tried this: click on .xib file -> attribute inspector -> change 'Status Bar' to 'None' (refer attached image) enter image description here

    0 讨论(0)
  • 2020-12-18 14:18
    //viewDidload
    if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
    // iOS 7
    [self prefersStatusBarHidden];
    [self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
    } else {
    // iOS 6
    [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
    }
    
    
    // Add this Method
    - (BOOL)prefersStatusBarHidden
    {
    return YES;
    }
    
    0 讨论(0)
  • 2020-12-18 14:25

    Please add this to your view controller

    - (BOOL)prefersStatusBarHidden {
        return YES;
    }
    
    0 讨论(0)
  • 2020-12-18 14:29

    in your "*project_name*-Info.plist" file, add a key named "Status bar is initially hidden" and then set the value to "YES". that will always hide the status bar.

    0 讨论(0)
  • 2020-12-18 14:34

    Open your application Info.plist file and add the following lines:

    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>UIStatusBarHidden</key>
    <true/>
    
    0 讨论(0)
提交回复
热议问题