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.
My Application's Table View - default in navigation base application On navigation controller I have added (add employee) button. On Add(employee) click i have written following code in appDelegate.m -(IBAction)AddClicked:(id)sender { if(self.addData==nil) // addData is a object of my next view { addData=[[AddEmpScrn alloc] initWithNibName:@"AddEmpScrn" bundle:nil] autorelease]; } [self.navigationController presentModalViewController:self.addData animated:YES]; } 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 know if i use dismisss current view, that will not reflect previous view.
that is i am setting a new screen - add employee - using present ModelView
now after adding my "add emp" screen will be dismissed,
but previous data is as it is,
it means no data is added in table view - no employee added.
i have to restart application to take effect of added employees