5

I am using the UIPageViewController. How do I make it so that each page of the controller is full screen. Right now I have images but it doesn't cover the full screen of the app. What can I do?

I am doing the following:

self.pageController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil];

self.pageController.dataSource = self;
[[self.pageController view] setFrame:[[self view] bounds]];

APPChildViewController *initialViewController = [self viewControllerAtIndex:0];

NSArray *viewControllers = [NSArray arrayWithObject:initialViewController];

[self.pageController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];

[self addChildViewController:self.pageController];
[[self view] addSubview:[self.pageController view]];
[self.pageController didMoveToParentViewController:self];
Chris Hansen
  • 7,813
  • 15
  • 81
  • 165
  • Possible duplicate of [How to remove the bottom gap of UIPageViewController](http://stackoverflow.com/questions/19935887/how-to-remove-the-bottom-gap-of-uipageviewcontroller) – fireant Nov 04 '16 at 06:54

0 Answers0