Adding ViewController's View as subview to UIPageViewController in iOS 8 gives weird UINavigationBar while show/hide

后端 未结 3 1549
青春惊慌失措
青春惊慌失措 2020-12-22 08:22

I have been working on a project where I needed to show list of images with zoom / swipe feature as presented view modal. I created custom ImageViewer using

相关标签:
3条回答
  • 2020-12-22 08:45

    Curious are you hiding your nav controller like this?

    [self.navigationController setNavigationBarHidden:YES];
    

    also if you have multiple Nav controllers, you might need to check you are referencing the correct one.

    If you want it to be hidden when you present the ViewController you should move it to

        -(void) ViewWillAppear{
    }
    
    0 讨论(0)
  • 2020-12-22 08:48

    check in storyboard for particular viewController and make sure Extended Edges >> Under top bars is not selected.

    0 讨论(0)
  • 2020-12-22 09:07

    I had a very similar issue and the way i fixed it was select the view being added to the UIPageViewController in the storyboard and selected the pin options. Below in the image you can see the Constrain to margins options, make sure you unselect that. Also when choosing what view to pin it to make sure you select the superview and not the Top Layout Guide. enter image description here

    0 讨论(0)
提交回复
热议问题