ios - Setting NavigationController as an initial controller -


i have 2 navigation controllers. how can set second 1 - stopwatch initial navigation controller?

- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions {      // override point customization after application launch.     self.window = [[uiwindow alloc] initwithframe:[[uiscreen mainscreen] bounds]];     self.window.backgroundcolor = [uicolor whitecolor];      self.swipebetweenvc = [swipe new];     [self setuprootviewcontrollerforwindow];     self.window.rootviewcontroller = self.swipebetweenvc;      [self.window makekeyandvisible];      return yes; }  - (void)setuprootviewcontrollerforwindow {     uistoryboard *storyboard1 = [uistoryboard storyboardwithname:@"main" bundle: nil];     stopwatch *controller1 = (stopwatch *)[storyboard1 instantiateviewcontrollerwithidentifier:@"stopwatch"];     uinavigationcontroller *stopwatch = [[uinavigationcontroller alloc] initwithrootviewcontroller:controller1];      namescontroller *controller2 = (namescontroller *)[storyboard1 instantiateviewcontrollerwithidentifier:@"namescontroller"];     uinavigationcontroller *nameslist = [[uinavigationcontroller alloc] initwithrootviewcontroller:controller2];      self.swipebetweenvc.viewcontrollers = @[nameslist, stopwatch]; } 

just put stopwatch view first

 self.swipebetweenvc.viewcontrollers = @[stopwatch, nameslist]; 

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -