【发布时间】:2015-05-21 02:41:28
【问题描述】:
我想让我的应用程序在 CameraViewController 中有自定义按钮;一个推送到 Rustles ViewController(下图中的顶部 VC),另一个转换到 ViewController(底部 VC)。
现在我的应用程序可以通过使用以下方法正确地转到 viewControllers:
-(void)segueToRustlesTableViewController{
if (debug==1) {NSLog(@"Running %@ '%@'", self.class, NSStringFromSelector(_cmd));} // simple debug statement, can ignore
// Instantiate nav controller which segues to table view
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil]; // must assume only IPhone
RustlesTableViewController *rustlesTVC = (RustlesTableViewController *)[storyboard instantiateViewControllerWithIdentifier:@"RustlesView"];
[self performSegueWithIdentifier:@"tableSegue" sender:self];
[self.PickerController presentViewController:rustlesTVC animated:NO completion:nil];
}
但是,当我到达 UIViewControllers 时,我无法转换回旧的 UIViewControllers,大概是因为我没有在每个 UIViewControllers 中嵌入导航控制器。
我现在的代码不适用于 NavigationController,但我真的不知道如何转换到 NavigationController,然后转换到 NavigationController 之后的 UIViewControllers。
如何从 CameraViewController 转换到 aNavigationController,然后再转换到 RustlesViewController?
【问题讨论】:
标签: ios objective-c uiviewcontroller uinavigationcontroller