ios - childViewControllerForStatusBarHidden For Hiding -


i trying hide half of status bar. specifically, using refrostedviewcontroller side drawer, , when comes out, go on status such in picture (the app google's inbox).

enter image description here

the current hierarchy of uiviewcontroller so:

- refrostedviewcontroller  |--menuviewcontroller  |--navigationcontroler     |--contentviewcontroller 

i have uiviewcontrollerbasedstatusbarappearance set yes. in drawer menu (menuviewcontroller) have method

- (bool)prefersstatusbarhidden {     return yes; } 

in navigation controller have:

- (uiviewcontroller *)childviewcontrollerforstatusbarhidden {     return self.frostedviewcontroller.menuviewcontroller; } 

this hides status bar in screens. when

- (uiviewcontroller *)childviewcontrollerforstatusbarhidden {     if (self.isdraweropen)      {         return self.frostedviewcontroller.menuviewcontroller;     } else {         return self.frostedviewcontroller.contentviewcontroller;     } } 

it crashes. self.frostedviewcontroller.contentviewcontroller holds navigationcontroller (which has prefersstatusbarhidden method implemented)


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -