iphone - Is it ok to re-assign the rootviewcontroller of the window again and again in this case...? -


i have splitviewcontroller based application, problem split view comes picture after 2 modal views.

  1. for login
  2. some other useful info user.

now know splitview controller should root view controller. create 3 objects in appdelegate class. , b, , split view controller c.

the order of navigation a-->b-->c;

so in app delegate do..

self.loginviewcontroller=[[loginviewcontroller alloc] init]; self.window.rootviewcontroller = self.loginviewcontroller; 

and once login button pressed loginview controller..

tsappdelegate *appdelegate=(tsappdelegate *)[[uiapplication sharedapplication] delegate];                 appdelegate.meetingsviewcontroller=[[meetingsviewcontroller alloc] init];                 [uiview                  transitionwithview:appdelegate.window                   duration:0.8                  options:uiviewanimationoptiontransitioncrossdissolve                  animations:^(void) {                      bool oldstate = [uiview areanimationsenabled];                      [uiview setanimationsenabled:no];                      appdelegate.window.rootviewcontroller=appdelegate.meetingsviewcontroller;                          [uiview setanimationsenabled:oldstate];                  }                   completion:nil]; 

this here presents second view... , show split view controller if action performed on second view controller...

so question if correct way it... ? (this works fine way , enterprise application)

p.s. tried making split view controller rootviewcontroller , adding other view controllers views subview doesn't work properly.

sure, it's fine reassign window's rootviewcontroller.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -