Xcode 7 导航控制器问题
Xcode 7 navigationcontrller issue
当我用 xcode 7.
编译我的代码时,我遇到了一些问题
这是我的代码:
UIViewController *vcSomeObj = [self.storyboard instantiateViewControllerWithIdentifier:@"vcSOmeClass"];
vcSomeObj.channelID = detailOfUserTable.ID;
[self.navigationController setViewControllers:@[vcSomeObj] animated:NO];
当我编译 运行 来自 xcode6.4.
的代码时,这工作正常
这东西挂了我的申请。当我转到任何应用程序并再次访问我的应用程序时,它会转到主控制器,并且在一段时间后应用程序崩溃。
我在调试中找不到任何东西。
在我的 opinion.you 中,当您处于当前 viewController 时,将当前导航的 viewcontroller.what 设置为导航堆栈中的当前 viewController,所以,我想您可以这样做
[self.navigationController setViewControllers:@[vcSomeObj,self] animated:NO];
在故事板文件中我们需要select英文复选框,否则应用程序会挂起崩溃。
当我用 xcode 7.
编译我的代码时,我遇到了一些问题这是我的代码:
UIViewController *vcSomeObj = [self.storyboard instantiateViewControllerWithIdentifier:@"vcSOmeClass"];
vcSomeObj.channelID = detailOfUserTable.ID;
[self.navigationController setViewControllers:@[vcSomeObj] animated:NO];
当我编译 运行 来自 xcode6.4.
的代码时,这工作正常这东西挂了我的申请。当我转到任何应用程序并再次访问我的应用程序时,它会转到主控制器,并且在一段时间后应用程序崩溃。
我在调试中找不到任何东西。
在我的 opinion.you 中,当您处于当前 viewController 时,将当前导航的 viewcontroller.what 设置为导航堆栈中的当前 viewController,所以,我想您可以这样做
[self.navigationController setViewControllers:@[vcSomeObj,self] animated:NO];
在故事板文件中我们需要select英文复选框,否则应用程序会挂起崩溃。