Does anyone know what am I missing in order to add manually my own view controllers to the UIPageViewController methods?
I currently have this and I do not know how to proceed:
NSDictionary *pageViewOptions = [NSDictionary dictionaryWithObjectsAndKeys:UIPageViewControllerOptionSpineLocationKey, [NSNumber numberWithInteger:UIPageViewControllerSpineLocationMin], nil];
self.pageViewController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStylePageCurl navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:pageViewOptions];
BookViewController *pageOne = [self.storyboard instantiateViewControllerWithIdentifier:@"BookViewController"];
AnotherPage *pageTwo = [self.storyboard instantiateViewControllerWithIdentifier:@"AnotherPage"];
PageThree *pageThree = [self.storyboard instantiateViewControllerWithIdentifier:@"PageThree"];
self.pageViewController.delegate = self;
self.pageViewController.dataSource = self;
[self.pageViewController setViewControllers:[NSArray arrayWithObjects:pageOne, pageTwo, pageThree, nil] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
[self addChildViewController:self.pageViewController];
[self.view addSubview:self.pageViewController.view];
self.view.gestureRecognizers = self.pageViewController.gestureRecognizers;
[self.pageViewController didMoveToParentViewController:self];
But it does not seem to work. I only see the RootViewController.
Thanks to all of you who like to help eager newbies like me, in advance.... :)