Swift: 删除状态栏时出错

Swift: Error When Removing Status Bar

我正在尝试从我的 UIViewController 中删除状态栏。我进入 info.plist 并将 View controller-based status bar appearance 更改为 NO 并在我的 AppDelegate.swift 中实现了以下内容:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    // Override point for customization after application launch.
    application.statusBarHidden = true
    return true
}

为什么当我 运行 我的应用程序时,我在控制台中收到以下错误。我正在 运行ning Xcode 版本 7.0 beta 6 (7A192o):

<Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

<Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

<Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

请务必注意,状态栏已从视图中删除。每当我 运行 应用程序时,我都会收到此错误。

这是 iOS9 的已知问题。您可以安全地忽略此错误。

(https://forums.developer.apple.com/thread/13683)