ios - Segue not updating delegate window -


i have controller chooses 1 of 2 segues , executes them @ viewdidappear:. 1 of them leads uinavigationcontroller , other leads uitabbarcontroller , both of them implement preferredstatusbarstyle.

at point user can open overlay controller check presented view controller , replicate preferredstatusbarstyle

my problem can never current view controller being displayed. i'm using code bellow current controller returning first controller ever showed (the storyboard root view controller) , not current one.

internal override func preferredstatusbarstyle() -> uistatusbarstyle {   if let rootviewcontroller = uiapplication.sharedapplication().delegate?.window??.rootviewcontroller {     return rootviewcontroller.preferredstatusbarstyle()   } else {     return .default   } } 

am doing wrong?


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -