Skip to content

Commit

Permalink
Use preferredStatusBarStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
onmyway133 committed Nov 22, 2017
1 parent 8e59fdd commit 63bcdfb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Source/WhistleFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ open class WhistleFactory: UIViewController {
}

func moveWindowToFront() {
let currentStatusBarStyle = UIApplication.shared.statusBarStyle
whistleWindow.windowLevel = view.isiPhoneX ? UIWindowLevelNormal : UIWindowLevelStatusBar
UIApplication.shared.setStatusBarStyle(currentStatusBarStyle, animated: false)
setNeedsStatusBarAppearanceUpdate()
}

open override var preferredStatusBarStyle: UIStatusBarStyle {
return UIApplication.shared.statusBarStyle
}

open func setupFrames() {
Expand Down

0 comments on commit 63bcdfb

Please sign in to comment.