最近有个需求,在启动页或欢迎页的时候,状态栏进行隐藏,其他时候状态栏显示...
实现步骤如下
-
添加
WX20180917-151851@2x.pngStatus bar is initially hidden
为YES
-
在AppDelegate文件中的
WX20180917-152333@2x.pngfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
设置隐藏
WX20180917-152506@2x.png -
在自定义TabbarController文件的
override func viewDidLoad()
中设置显示
*YTStatusBarHidden = false
网友评论