0
我是iOS開發新手。 我有一個導航控制器故事板和UIViewController
連接到它。來自UIPageViewController的navigationController pushViewController不工作
在UIViewController
自定義類,我添加三個UIViewController
下UIPageViewController
:
_one= [self.storyboard instantiateViewControllerWithIdentifier:@"View1"];
_two = [self.storyboard instantiateViewControllerWithIdentifier:@"View2"];
_three = [self.storyboard instantiateViewControllerWithIdentifier:@"View3"];
_page = [[CustomUIPageViewController alloc] initWithParentViewController:self];
_page.viewControllers = @[_one, _two, _three];
[self.view addSubview:_page.view];
...
我想通過調用顯示從頁面_TWO視圖驗證碼:
ResultViewController *view = [self.storyboard instantiateViewControllerWithIdentifier:@"ResultBoard"];
[self.navigationController pushViewController:view animated:YES];
但它不工作,我也嘗試:
[self.parentViewController.navigationController pushViewController:view animated:YES];
哪個視圖顯示? –
@ S.Jain這是一個UIViewController的故事板頁面。 – DzungPV