2

我的视图平台库和导航控制器有问题,当我按下带有 popviewcontroller 的后退按钮时应用程序崩溃。是否有人在他们的应用程序中添加了带有导航控制器的视图面板?

我以这种方式初始化了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];
4

1 回答 1

4

使用卢克:

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];
于 2012-11-15T02:54:40.207 回答