【发布时间】:2013-06-22 12:20:14
【问题描述】:
我有以下问题: 当我试图通过在我的 masterView 的表中选择一个项目来替换我的 UISplitViewController 的 detailView 时,masterView 的导航栏按钮消失了。如果 iPad 处于横向模式,则更换工作没有任何错误迹象。当我先将 iPad 旋转到横向模式然后再回到纵向模式时,该按钮又回来了。所以我想我已经正确设置了 uisplitviewcontroller 的委托。是否有可能告诉 uisplitviewcontroller 要求代表在不旋转设备的情况下更新按钮,或者我在替换 detailView 时是否忘记了某些内容 - 这是 masterViewController 中的替换代码
MyViewController *myvc = [[MyViewController alloc] initWithNibName:nil bundle:nil];
[self.subservientController setViewControllers:[NSArray arrayWithObject:myvc] animated:NO];
self.splitViewController.delegate = myvc;
master的subservientController是navigationcontroller的引用,detailViewController(MyViewController)会在里面推送
【问题讨论】:
标签: ipad button delegates replace uisplitviewcontroller