My Map app has a " Select city " button to show worldCitiesList
when clicked using the following code:
[self.navigationController presentModalViewController:self.worldCitiesListNavigationController animated:YES];
But now the place for the " Select city " button has to be replaced by another button.
the " Select city " button has to be relocated to another viewcontroller created from the MapViewController
by the following code:
[self.navigationController presentModalViewController:self.tableViewNavigationController animated:YES];
The worldCitiesList
can be showed from the tableViewNavigationController
. But we want it is still showed from the MapViewController
as before.
So in the button of backing to the MapViewController
from the tableViewNavigationController
, I use following code to first back to MapViewController
, then to show the worldCityList
:
- (void) backMapView:(id)sender
{
[self.navigationController dismissModalViewControllerAnimated:YES];
[self.navigationController presentModalViewController:self.worldCitiesListNavigationController animated:YES];
}
But my app just return to MapViewControler
, but not show the worldCityList
further.
In my WorldCitiesListController.m
, my iOS app just goes to @synthesize
, but not go to viewWillAppear
and viewDidLoad
further.
Please help. thanks in advance !!!
My question solved by: 'dismissModalViewControllerAnimated: NO'. thanks!