【发布时间】:2013-11-19 00:47:59
【问题描述】:
在 prepareForSegue 方法中,我以模态方式推送 UINavigationController。我使用视图控制器数组为 UINavigation 控制器设置 viewControllers 数组,该数组填充在基于自定义初始化程序的自定义对象中。最初,我得到了带有所有 UIViewContorllers 的 UINavigationController 但 UINavigationConotrller 在数组中的最后一个 viewcontroller 开始,只有一个后退按钮。我添加了 popToRootViewControllerAnimated 行,现在 UINavigationController 从第一个 UIViewController 开始,但没有下一步按钮?如何让下一个按钮出现在 NavigationBar 中以浏览视图控制器?
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
NSNumber *switchOn = [NSNumber numberWithBool:self.blueSwitch.on];
PBVslideViews *slideViews = [[PBVslideViews alloc] initWithQuestionareResults:switchOn];
PBVpressentationNavigation *slides = (PBVpressentationNavigation
*)segue.destinationViewController;
[slides setViewControllers:slideViews.slideViews animated:YES];
[slides popToRootViewControllerAnimated:YES];
}
【问题讨论】:
标签: ios objective-c uiviewcontroller uinavigationcontroller uinavigationbar