我的地图应用程序有一个“选择城市”按钮,worldCitiesList使用以下代码单击时显示:
[self.navigationController presentModalViewController:self.worldCitiesListNavigationController animated:YES];
但是现在“选择城市”按钮的位置必须由另一个按钮代替。
“选择城市”按钮必须重新定位到MapViewController由以下代码创建的另一个视图控制器:
[self.navigationController presentModalViewController:self.tableViewNavigationController animated:YES];
worldCitiesList可以从 中显示tableViewNavigationController。但是我们希望它仍然MapViewController像以前一样显示出来。
因此,在MapViewController从回退到 的按钮中tableViewNavigationController,我使用以下代码首先回退到MapViewController,然后显示worldCityList:
- (void) backMapView:(id)sender
{
[self.navigationController dismissModalViewControllerAnimated:YES];
[self.navigationController presentModalViewController:self.worldCitiesListNavigationController animated:YES];
}
但我的应用程序只是返回MapViewControler,但没有worldCityList进一步显示。
在我的WorldCitiesListController.m中,我的 iOS 应用程序只是转到,@synthesize但没有转到更远。viewWillAppearviewDidLoad
请帮忙。提前致谢 !!!