0

I have a number of view controllers that I want to navigate; however, I need to implement an intuitive way to move to previous ones. For the button press methods in my view controller custom classes to move forward, I do something like this:

NextViewController *next = [self.storyboard instantiateViewControllerWithId:@"NextViewController"];
[self presentModalViewController:next animated;YES]; 

With this in mind, how can I return back to previous views?

1

2 Answers 2

1

Why not just use the built in UINavigationController? You can hide the navigation bar and use custom controls to push and pop controllers as you wish

Sign up to request clarification or add additional context in comments.

Comments

0

When using modals you simply add a button that links to the action:

-(void)goBack:(id)sender {
    [self dismissModalViewControllerAnimated:YES];
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.