I have a bunch a views connected through buttons by using the command presentModalView
For example they're connected like this: View1 -> View2 -> View3 -> View4
In View4 I want to make a button that goes back to View1. I figured out how to do this by writing this:
[self.parentViewController.parentViewController.parentViewController dismissModalViewControllerAnimated:YES];
However once I go back to View1 I can't click through again like how I was able to before I dismissed it (I get stuck at View2 because the buttons don't click anymore).
I found this in the SDK documentation:
"If you dismiss a modal view controller in the middle or bottom of the stack, all the modal view controllers on top of that view controller are also dismissed. Use the modalViewController property before invoking this method if you need to retain the modal view controller."
I think this is the problem I'm running into, but I don't really know what they mean by using the modalViewController property. I'd appreciate any tips.
For example they're connected like this: View1 -> View2 -> View3 -> View4
In View4 I want to make a button that goes back to View1. I figured out how to do this by writing this:
[self.parentViewController.parentViewController.parentViewController dismissModalViewControllerAnimated:YES];
However once I go back to View1 I can't click through again like how I was able to before I dismissed it (I get stuck at View2 because the buttons don't click anymore).
I found this in the SDK documentation:
"If you dismiss a modal view controller in the middle or bottom of the stack, all the modal view controllers on top of that view controller are also dismissed. Use the modalViewController property before invoking this method if you need to retain the modal view controller."
I think this is the problem I'm running into, but I don't really know what they mean by using the modalViewController property. I'd appreciate any tips.