iOS状态栏

隐藏状态栏

  • 方法1

#import "ViewController.h"

@interface ViewController ()
@end

@implementation ViewController

- (BOOL)prefersStatusBarHidden{
    return YES;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

@end

  • 方法2

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    self.window.windowLevel = UIWindowLevelAlert;
    
    return YES;
}

修改状态栏字体的颜色

http://blog.csdn.net/gaoyp/article/details/38441723

你可能感兴趣的:(iOS状态栏)