In Xcode, I’ve got one ViewController segued to a second, and on the second I’ve got a ‘go back’ button:
The initial programming was:
- (IBAction)onBackButtonPressed:(id)sender {
[self dismissModalViewControllerAnimated:YES];
}
But as of iOS 6 the code has deprecated – what should I use then?
I’m a beginner, and basically want to programme a button which takes me back to the original ViewController from my second one.
The new method you could use is: