Reputation:
I am Using a Navigation based application. However i don't want to push a view. I have changed present ModalViewController. Now, I am confused - how to load previouse view.
This code works successfully & next Add Employee screen load perfactly.
But Now I am confused.
How to get back to previous view? that is if a user click on "Save" or "Cancel" it should display again the previous view... main screen
I dont know how to solve it...
anybody please help me...
i will be thank full.
Upvotes: 1
Views: 457
Reputation: 7304
Have you read "Using Modal View Controllers"?
If you presentModalViewController then the old view is still there "behind" it. You just need to call dismissModalViewControllerAnimated: on the original navigation controller.
If you are directly manipulating the view hierarchy by swapping out subviews, you will need to hold onto the old view in another member variable and make sure to retain it.
Upvotes: 0
Reputation: 22395
Have u tried using the dismissModalViewController method? should do what you are asking f or
Upvotes: 1