我有一个自定义UIPageViewController
,其中包含5个UIViewControllers
,现在我想从其中一个UIViewController
导航,但我无法理解,因为在UIViewControllers
UINavigationController
1}}没有UIViewControllers
。任何人都可以建议我,我如何从那些5 UIViewController
导航到其他for A4i = A4{ii}
?
答案 0 :(得分:2)
您的代码 - [AppDelegate application:didFinishLaunchingWithOptions:]
可能看起来像这样(当然在检查你的跳过条件后):
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *vc1 = [storyboard instantiateViewControllerWithIdentifier:@"MyAuth"]; //if you assigned this ID is storyboard
UIViewController *vc2 = [storyboard instantiateViewControllerWithIdentifier:@"Login"]; //if you assigned this ID is storyboard
UIViewController *vc3 = [storyboard instantiateViewControllerWithIdentifier:@"Details"];
NSArray *controllers = @[vc1, vc2, vc3];
UINavigationController *navController = (UINavigationController *)self.window.rootViewController;
[navController setViewControllers:controllers];
如果您将此粘贴到 - [AppDelegate application:didFinishLaunchingWithOptions:]
,您会看到它立即生效。