我的 View 面板库和导航 Controller 有问题,当我使用 popviewcontroller 按下返回按钮时应用程序崩溃。
是否有人在他们的应用中添加了带有导航 Controller 的 View 面板?
我已经以这种方式初始化了deckView:
LeftViewController *leftViewController = [[LeftViewController alloc]initWithNibName"LeftViewController" bundle:[NSBundle mainBundle]];
CentraController *centralViewController = [[CentraController alloc]initWithNibName"CentraController" bundle:[NSBundle mainBundle]];
self.deckController = [[IIViewDeckController alloc]initWithCenterViewController:centralViewController leftViewController:leftViewController];
self.deckController.leftLedge = 100;
self.deckController.navigationControllerBehavior = IIViewDeckNavigationControllerContained;
[self.navigationController initWithRootViewController:deckController];
[window setRootViewController:self.navigationController];
Best Answer-推荐答案 strong>
使用 source卢克:
ViewController *centerController = [[ViewController alloc]initWithNibName"ViewController" bundle:nil];
self.centerController = [[UINavigationController alloc]initWithRootViewController:centerController];
IIViewDeckController* deckController = [[IIViewDeckController alloc] initWithCenterViewController:self.centerController leftViewController:self.leftController rightViewController:rightController];
关于iphone - 导航 Controller 和 ViewDeck 库,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/12493352/
|