1、设置Info.plist中的View controller-based status bar appearance为YES
2、然后在AppDelegate.swift中的
func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -> Bool
方法中加入:
UINavigationBar.appearance().barStyle = UIBarStyle.Black
OK,就是这么简单。这样状态栏的字体就变成白色了!
时间: 2024-12-14 04:30:37