Reputation: 2583
I am just curious about certain scenario here. So lets say I have a navigation controller which have a stack Based like:
Person 1.Worker
Now Lets suppose I am in Person root controller, and by default I push to go to Worker controller then to Male Controller by default, and I can inter-exchange to switch to Female controller. Being in Female Controller, how can I popview to goto Worker controller, as I have already pushed from male to female?
Thanks.
Upvotes: 0
Views: 207
Reputation: 170849
I think you have 2 options here:
Since "Male" and "Female" controllers logically must be on the same level in the hierarchy so pop male controller without animations before pushing Female controller to the navigation stack. That way standard "Back" button will work fine for you
In your "Male" and "Female" controllers keep a reference to parent "Worker" controller and pop using popToViewController:animated:
method - but doing this way you won't be able to use standard Back button (at least without some extra work)
Upvotes: 1