ios - Why behaviour from AppDelegate and via typhoon is different? -


i want set style status bar to:

 [uiapplication sharedapplication].statusbarstyle = uistatusbarstylelightcontent; 

if i'm doing appdelegate directly - ok, via typhoon - not.

1) that's working ok:

- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions {     [[self stylekit] apply];     [self.window makekeyandvisible];     return yes; } 

2) , that's not working:

- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions {     return yes; }  -(void)initialize {     [[self stylekit] apply];     [self.window makekeyandvisible]; } 

at second way use typhoon like:

@implementation lamainassembly -(appdelegate *)appdelegate {     return [typhoondefinition withclass:[appdelegate class] configuration:^(typhoondefinition *definition) {         [definition injectproperty:@selector(window) with:[self mainwindow]];         [definition injectproperty:@selector(stylekit)];         [definition performafterinjections:@selector(initialize)];     }]; } @end 

in both cases use same advanced version of styling, there a:

[uiapplication sharedapplication].statusbarstyle = uistatusbarstylelightcontent; 

i think it's because typhoon starts it's initialization before didfinishlaunchingwithoptions.

i recommend avoid dependency on typhoon initialization order , ui setup explicit after didfinishlaunchingwithoptions method called (your first way)


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -