title: Adding a UIPageViewController to a subview, subview only shows edge of pageContentview
body: <p>I'm trying to display an entire pageContentView within a SubView on a rootViewController. I'm able to see  the pageView but it doesn't auto-resize correctly to fit the SubView, it only shows a cutoff portion of the pageContentView </p>
  
  <p>Here's what it looks like </p>
  
  <p><img src="https://i.stack.imgur.com/KoqfK.png" alt=""></p>
  
  <p>Here's what it should look like</p>
  
  <p><img src="https://i.stack.imgur.com/ezVcP.png" alt=""></p>
  
  <p>I can't figure out how to resize the pageView so it display correctly in a subView.</p>
  
  <p>RootViewController.h </p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "PageContentViewController.h"
  @class PageContentViewController;
  
  @interface CLDViewController : UIViewController &lt;UIPageViewControllerDataSource&gt;
  
  @property (weak, nonatomic) IBOutlet UIView *subViewRoot;
  - (IBAction)startWalkthrough:(id)sender;
  @property (strong, nonatomic) UIPageViewController *pageViewController;
  @property (strong, nonatomic) NSArray *pageTitles;
  @property (strong, nonatomic) NSArray *pageImages;
  
  @property (strong,nonatomic) PageContentViewController *bounds;
  @end
  </code></pre>
  
  <p>ViewDidLoad and required methods for UIPageViewController in RootController</p>
  
  <pre><code>   - (void)viewDidLoad
   {
  
      [super viewDidLoad];
  
      _pageTitles = @[@"Over 200 Tips and Tricks", @"Discover Hidden Features", @"Bookmark Favorite Tip", @"Free Regular Update"];
      _pageImages = @[@"page1.png", @"page2.png", @"page3.png", @"page4.png"];
  
      // Create page view controller
      self.pageViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PageViewController"];
      self.pageViewController.dataSource = self;
  
      PageContentViewController *startingViewController = [self viewControllerAtIndex:0];
      NSArray *viewControllers = @[startingViewController];
      [self.pageViewController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
  
      //Trying to setup the pageViewContoller view to be inside the subview (subViewRoot)
      self.pageViewController.view.frame = self.subViewRoot.bounds;
      [self addChildViewController:_pageViewController];
      [self.subViewRoot addSubview:_pageViewController.view];
      [self.pageViewController didMoveToParentViewController:self];
  
  
  }
  
  
      - (PageContentViewController *)viewControllerAtIndex:(NSUInteger)index
  {
      if (([self.pageTitles count] == 0) || (index &gt;= [self.pageTitles count])) {
          return nil;
      }
  
      // Create a new view controller and pass suitable data.
      PageContentViewController *pageContentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PageContentViewController"];
      pageContentViewController.imageFile = self.pageImages[index];
      pageContentViewController.titleText = self.pageTitles[index];
      pageContentViewController.pageIndex = index;
  
      return pageContentViewController;
  }
  
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  #pragma mark - Page View Controller Data Source
  
  
  
  - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController
  {
      NSUInteger index = ((PageContentViewController*) viewController).pageIndex;
  
      if ((index == 0) || (index == NSNotFound)) {
          return nil;
      }
  
      index--;
      return [self viewControllerAtIndex:index];
  }
  
  - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController
  {
      NSUInteger index = ((PageContentViewController*) viewController).pageIndex;
  
      if (index == NSNotFound) {
          return nil;
      }
  
      index++;
      if (index == [self.pageTitles count]) {
          return nil;
      }
      return [self viewControllerAtIndex:index];
  }
  
  - (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController
  {
      return [self.pageTitles count];
  }
  
  - (NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController
  {
      return 0;
  }
  </code></pre>
  
  <p>PageContentViewController.m </p>
  
  <p>-viewDidLoad</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      self.backgroundImageView.image = [UIImage imageNamed:self.imageFile];
      self.titleLabl.text = self.titleText;
  
  }
  </code></pre>
  
  <p>Has anyone ran into this situation before? What did you do? </p>
  
  <p>Thanks for the help!</p>