Keep origin status bar style if possible#21
Keep origin status bar style if possible#21yageek wants to merge 2 commits intomutualmobile:masterfrom yageek:origin
Conversation
There was a problem hiding this comment.
Is presentingViewController non-nil for the only view controller in a window?
There was a problem hiding this comment.
If presentingViewControlleris nil, a message is sent to nil and the test fails
if([self.presentingViewController respondsToSelector:@selector(preferredStatusBarStyle)]) equals if(nil) and the code below will not be called.
There was a problem hiding this comment.
While the above is true, I was asking because I'm not positive that presentingViewController is ever non-nil. Since this view controller is never really ever presented, and simply used as the root view controller of a window that we control. The only way I could see this working is if the presentedViewController that we are querying is on the key window's root view controller and not our own window.
There was a problem hiding this comment.
You are right. I did tests with a tab bar controller based application and a navigation controller based application and the behavior is different. With the tab bar based application, the presentingViewController is the controller within the tab bar that presented the HUD. With the navigation controller, presentingViewController is nil.
Keep origin status bar style if possible.