【发布时间】:2015-10-15 20:29:14
【问题描述】:
我在我的应用程序中使用 mmdrawercontroller...当我从抽屉中选择一个 tableviewcell 时,我在导航控制器上推送 tableview A,然后在从 tableview A 中选择 tableviewcell 时,我在导航控制器上推送 tableview B... tableview B 出现,然后立即弹回 tableview A。
我在 tableview B 的 viewdidload 方法上进行了调试,导航控制器将 tableviewB 与 tableview A 和主视图一起推到了它上面...... tableview B 的所有 tableview 方法也被触发了......但后来不知何故 tableviewB 弹出并重新打开表视图 A... 这种奇怪行为的任何原因..?
注意
但是,当我以模态方式呈现自定义创建的 uinavigational 控制器时(通过以下代码 sn-p),它的行为正常......并且不会弹出......
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:tableviewB];
[self presentViewController:navigationController
animated:YES
completion:^{
NSLog(@"presenting modally rather pushing");
}];
所以导航控制器肯定出了问题..
【问题讨论】:
标签: ios objective-c uitableview uinavigationcontroller mmdrawercontroller