Skip to content

Commit e793bad

Browse files
committed
Preserve existing status bar style
1 parent 113a814 commit e793bad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SwiftMessages/WindowViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class WindowViewController: UIViewController
1313
private var window: UIWindow?
1414

1515
let windowLevel: UIWindowLevel
16-
var statusBarStyle = UIStatusBarStyle.Default
16+
var statusBarStyle: UIStatusBarStyle?
1717

1818
init(windowLevel: UIWindowLevel = UIWindowLevelNormal)
1919
{
@@ -41,6 +41,6 @@ class WindowViewController: UIViewController
4141
}
4242

4343
override func preferredStatusBarStyle() -> UIStatusBarStyle {
44-
return statusBarStyle
44+
return statusBarStyle ?? UIApplication.sharedApplication().statusBarStyle
4545
}
4646
}

0 commit comments

Comments
 (0)