我有一个名为Map的文件:
@interface Map : UIViewController<MKMapViewDelegate> {
IBOutlet MKMapView *map;
} 单击选项卡时,在interfaceBuider地图中启动:

单击时,地图会打开一个UITableViewController,而此UITableView会打开另一个UITableViewController。
所以我现在想要的是在最后的UITableViewController中,当后退按钮被按下时,返回到地图。我从来不换帐单,我一直在“钢琴”
因此,在Navigation.m中,我有:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}在我的第二个UITableView.m中:
Navigation *aMap = [[Navigation alloc]initWithNibName:@"Map" bundle:nil];
[self.navigationController popToViewController:aMap animated:YES];错误是什么:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Tried to pop to a view controller that doesn't exist.'我该怎么做呢?
提前谢谢你
发布于 2012-09-11 20:34:19
编辑:
用于后根
[self.navigationController popToRootViewControllerAnimated:YES];背部
[self.navigationController popViewControllerAnimated:YES];https://stackoverflow.com/questions/12369507
复制相似问题