iOS统一设置状态栏的样式,交给代理AppDelegate

来源:互联网 发布:nginx安装ssl模块 编辑:程序博客网 时间:2024/05/22 12:16

1.info.plist文件增加一项

View controller-based status bar appearance 为 NO

2.AppDelegate.m文件

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    // Override point for customization after application launch.        //设置状态栏的样式    application.statusBarStyle = UIStatusBarStyleLightContent;        return YES;}


0 0