Search code examples
iosuiviewcontrollerios8uinavigationbaruipageviewcontroller

Black status bar on startup iOS8 using UIPageViewController


I'm using https://github.com/cwRichardKim/RKSwipeBetweenViewControllers/issues to do swiping in between views. Things are good, except for when I first launch the app, there is a black bar where the status bar should be.

Not enough reputation for images so here's a link

If I touch the screen at all, the navigation bar slides up and everything returns to normal. Fwiw, I'm hiding the navigation bar and implementing my own using custom views, and I'm on ios 8.3


Solution

  • I tried to solve this for ~10 hours before giving up. I finally solved it when I was trying to solve another issue, and found a method that was worth a shot.

    After setting the delegate for UIPageViewController, just put

    pageViewController.automaticallyAdjustsScrollViewInsets = NO;