File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,22 +69,20 @@ - (UIViewController *)viewControllerForStatusBarStyle
6969{
7070 UIViewController *currentViewController = [self currentViewController ];
7171
72- if ([currentViewController childViewControllerForStatusBarStyle ]) {
73- return [currentViewController childViewControllerForStatusBarStyle ];
74- } else {
75- return currentViewController;
72+ while ([currentViewController childViewControllerForStatusBarStyle ]) {
73+ currentViewController = [currentViewController childViewControllerForStatusBarStyle ];
7674 }
75+ return currentViewController;
7776}
7877
7978- (UIViewController *)viewControllerForStatusBarHidden
8079{
8180 UIViewController *currentViewController = [self currentViewController ];
8281
83- if ([currentViewController childViewControllerForStatusBarHidden ]) {
84- return [currentViewController childViewControllerForStatusBarHidden ];
85- } else {
86- return currentViewController;
82+ while ([currentViewController childViewControllerForStatusBarHidden ]) {
83+ currentViewController = [currentViewController childViewControllerForStatusBarHidden ];
8784 }
85+ return currentViewController;
8886}
8987
9088@end
You can’t perform that action at this time.
0 commit comments