cwRichardKim / RKSwipeBetweenViewControllers

Swipe between ViewControllers like in the Spotify or Twitter app with an interactive Segmented Control in the Navigation Bar
MIT License
1.67k stars 156 forks source link

Black bar at status bar if navigationBar is hidden #20

Closed theluxury closed 9 years ago

theluxury commented 9 years ago

I'm hiding the segmentbuttons by putting in

pageController.navigationController.navigationBar.hidden = YES;

in the viewWillAppear in RKSwipeBetweenViewControllers.m. It mostly works fine, except when the app is first launched, there is a black bar where the status bar normally is. If I touch anywhere on the screen, the view slides up and everything works fine afterwards. blackbar

theluxury commented 9 years ago

I spent ~10 hours on this before giving up. I finally solved it when I was reading up about another problem and found a method that I thought might be useful. But I solved this by putting

self.pageController.automaticallyAdjustsScrollViewInsets = NO;

at the end of setupPageViewController in RKSwipeBetweenViewControllers.m