Skip to content

Commit

Permalink
Respect child view controller status bar forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanolsonk committed Aug 25, 2014
1 parent fe2ee76 commit 7054919
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Classes/Explorer Toolbar/FLEXExplorerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,13 @@ - (UIStatusBarStyle)preferredStatusBarStyle
UIViewController *viewControllerToAsk = [self viewControllerForStatusBarAndOrientationProperties];
UIStatusBarStyle preferredStyle = UIStatusBarStyleDefault;
if (viewControllerToAsk && viewControllerToAsk != self) {
preferredStyle = [viewControllerToAsk preferredStatusBarStyle];
// We might need to foward to a child
UIViewController *childViewControllerToAsk = [viewControllerToAsk childViewControllerForStatusBarStyle];
if (childViewControllerToAsk) {
preferredStyle = [childViewControllerToAsk preferredStatusBarStyle];
} else {
preferredStyle = [viewControllerToAsk preferredStatusBarStyle];
}
}
return preferredStyle;
}
Expand All @@ -165,7 +171,13 @@ - (BOOL)prefersStatusBarHidden
UIViewController *viewControllerToAsk = [self viewControllerForStatusBarAndOrientationProperties];
BOOL prefersHidden = NO;
if (viewControllerToAsk && viewControllerToAsk != self) {
prefersHidden = [viewControllerToAsk prefersStatusBarHidden];
// Again, we might need to forward to a child
UIViewController *childViewControllerToAsk = [viewControllerToAsk childViewControllerForStatusBarHidden];
if (childViewControllerToAsk) {
prefersHidden = [childViewControllerToAsk prefersStatusBarHidden];
} else {
prefersHidden = [viewControllerToAsk prefersStatusBarHidden];
}
}
return prefersHidden;
}
Expand Down

0 comments on commit 7054919

Please sign in to comment.