Я новичок в разработке iOS. У меня есть панель с навигационным контроллером и UIViewController
.navigationController pushViewController от UIPageViewController не работает
В 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