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 dont know how to solve it...
anybody please help me...
i will be thank full.