How to hide the status bar programmatically in iOS 7?

后端 未结 12 1762
眼角桃花
眼角桃花 2020-12-05 17:00

In ios7, how can I hide the statusbar programmatically? I am using XCode 4.6.1 (ios6.1) and I want to implement this in XCode itself.

12条回答
  •  眼角桃花
    2020-12-05 18:02

    If anyone wanted the most updated way to do it (Swift 2.1 and latest Xcode 7.2)

    1. Set "View controller based status bar appearance to NO in your info.plist"

    2. UIApplication.sharedApplication().statusBarHidden = true // put inside app delegate somewhere (applicationWill or DidFinishLaunchingWithOptions:

提交回复
热议问题