Skip to content

Overwrite UIWindows's standard rootViewController getter for iOS 7 status bar handling #78

Merged
merged 1 commit into from Sep 8, 2013

3 participants

@scheinem
scheinem commented Sep 5, 2013

As of iOS 7 an application is looking for the top most window (regarding to it's level) to access it's rootViewController to access methods like 'preferStatusBarHidden'. Because MTStatusBarOverlay must has a higher windowLevel than the keyWindow (if the keyWindow is fullscreen) the application takes MTStatusBarOverlay rootViewController which makes the keyWindow's view controllers unable to modifiy the visiblity and style of the status bar under iOS 7.

Therefore I've overwritten the MTStatusBarOverlay's rootViewController getter to return the keyWindow's rootViewController.

@myell0w myell0w merged commit 8d2a565 into myell0w:master Sep 8, 2013
@myell0w
Owner
myell0w commented Sep 8, 2013

Thanks!

@yoyokko
yoyokko commented Oct 25, 2013

iOS 7 an application is looking for the top most shown window (regarding to it's level) to access it's rootViewController to access methods like 'preferStatusBarHidden'.
If the overlay is hidden (not alpha = 0), setting rootViewController to nil is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.