ios - How to go to particular viewcontroller from leftviewcontroller in IIViewDeck in storyboard? -


i having difficulty using iiviewdeck in app. using storyboard. have managed bring leftviewcontroller tableviewcontroller cells supposed segue particular viewcontroller in storyboard. how do this? have put in appdelegate.

 uistoryboard* mainstoryboard = [uistoryboard storyboardwithname:@"main" bundle: nil];  uiviewcontroller *menucontroller = [mainstoryboard    instantiateviewcontrollerwithidentifier:@"mainsidenavmenu"];  uinavigationcontroller* navigationcontroller = (uinavigationcontroller *) self.window.rootviewcontroller; self->viewdeckcontroller =  [[iiviewdeckcontroller alloc] initwithcenterviewcontroller:navigationcontroller leftviewcontroller:menucontroller rightviewcontroller:nil]; self.window.rootviewcontroller = self->viewdeckcontroller; 

you can manage code, didselectrowatindexpath method of table view.

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { uistoryboard*  sb = [uistoryboard storyboardwithname:@"main" bundle:nil];  if (indexpath.row == 0) {     mytripsviewcontroller* newcontroller = [sb instantiateviewcontrollerwithidentifier:@"viewcontroller1"];     [self.viewdeckcontroller closeleftviewbouncing:^(iiviewdeckcontroller *controller) {         self.viewdeckcontroller.centercontroller = newcontroller;     }]; } if (indexpath.row == 1) {     mytripsviewcontroller* newcontroller = [sb instantiateviewcontrollerwithidentifier:@"viewcontroller2"];     [self.viewdeckcontroller closeleftviewbouncing:^(iiviewdeckcontroller *controller) {         self.viewdeckcontroller.centercontroller = newcontroller;     }]; } else {     mytripsviewcontroller* newcontroller = [sb instantiateviewcontrollerwithidentifier:@"viewcontroller3"];     [self.viewdeckcontroller closeleftviewbouncing:^(iiviewdeckcontroller *controller) {         self.viewdeckcontroller.centercontroller = newcontroller;     }]; } 

}

so have defined row / viewcontroller couple.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -