objective c - iOS navigate from inital view to second view from the last view -


below see view hierarchy. view green color last view. last view want show view, indicated black arrow.

however when user wants navigate view, initial view (indicated yellow arrow) should presented. make segue last view "black arrow" view. how can show initial view (yellow arrow) when user goes back?

enter image description here

method1: well, depends on segues, if of them push type, green vc embedded too. if is, can navigate through hierarchy via [self.navigationcontroller poptoviewcontroller:desiredviewcontroller animated:yes].

here method does: pops view controllers until specified view controller @ top of navigation stack.

reference: uinavigationcontroller class

method2: if still want use modal presentation, create weak delegate property bind greencontroller controller, presented (or use nsnotificationcenter listen dismiss modal view controller event). once user pressed on dismissing, controller presented greencontroller redirects no animation yellow one. create illusion once dismissed controller underneath yellowcontroller. however, still depends on transition needs between yellow-green controllers.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -