ios - Navigate Back to previous view controller -


i have uiview->uicollectionview->uicollectionviewcell. trying navigate programatically none of these works. code did called. using storyboard.

- (void) goback:(nsnotification *) notification {       // [self.navigationcontroller popviewcontrolleranimated:yes];      //  [self dismissviewcontrolleranimated:yes completion:nil];       [self.navigationcontroller poptorootviewcontrolleranimated:yes]; } 

you need use:

[self.navigationcontroller poptorootviewcontrolleranimated:yes]; 

this bring root view controller.

if want navigate previous view controller, should implement:

[self.navigationcontroller popviewcontrolleranimated:yes]; 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -