title: UIPageView horizontal swipe and vertical swipe
body: <p>I have the following situation:</p>
  
  <p>In the storyboard I have 9 views. 3 "chapters" and each chapter has 2 "pages".</p>
  
  <p>When the user swipes up or down they can switch between chapter 1, 2 and 3.
  When the user gets on chapter 1, 2 or 3 and swipes left they get the pages in that chapter.</p>
  
  <p>See the following image for a schematic view of the storyboard:</p>
  
  <p><img src="https://i.stack.imgur.com/izuUA.jpg" alt="enter image description here"></p>
  
  <p>All these views are loaded through the pageviewcontroller.</p>
  
  <p>This can be easily done with the basic swipe gestures in iOS, but we want it to scroll when you swipe.</p>
  
  <p>What I have so far:</p>
  
  <p>The user can swipe (scroll) between the 3 chapters throught the following code:</p>
  
  <pre><code>chapters = @[@"H1", @"H2", @"H3"];
  UIPageViewController *pageViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PageViewControllerStart"];
  pageViewController.dataSource = self;
  
  // Create all of the view controlers that display each page on the story board
  viewControllers = [NSMutableArray array];
  
  for (int i = 0; i &lt; chapters.count; i++) {
      start *vc = [self.storyboard instantiateViewControllerWithIdentifier:chapters[i]];
      vc.index = i;
      [viewControllers addObject:vc];
  }
  
  // Set the default page to the first in the array and send it to the page view controller
  NSArray *defaultViewController = [NSArray arrayWithObject:viewControllers[slideNum]];
  
  ///
  pageViewController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationVertical options:nil];
  
  pageViewController.dataSource = self;
  pageViewController.view.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 0.01);
  
  [pageViewController setViewControllers:defaultViewController direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:nil];
  ///
  
      [self addChildViewController:pageViewController];
      [self.view addSubview:pageViewController.view];
      [pageViewController didMoveToParentViewController:self];
  </code></pre>
  
  <p>This code makes the "chapters" swipe scroll vertically perfectly.</p>
  
  <p>But how can I implement the "pages" in this code so they will scroll horizontally when the user swipes left on the chapter they are?</p>