Reputation: 8289
Scenario
I have an app that allows users to scroll up on a UITableView to view posts. When they scroll up the navigation bar will hide. I use the code from the following SO post...
Imitate iOS 7 Facebook hide/show expanding/contracting Navigation Bar
Problem
When I tried the first answer on there it worked the first time I used it, perfectly. After I got it to where it was working I tried to get my Tab Bar to drop down as well. When I fidgeted around with my code I must have fudged something up. Because now when I run the same code, I get this black bar that won't go away.
Unscrolled (normal)
Scrolled Up (leaves ugly black bar)
What I've also tried
GTScrollNavigationBar and TLYShyNavBar
and they both leave the black bar also...
Question
Does anyone know how to fix this?
Upvotes: 3
Views: 3763
Reputation: 562
I would recommend to just do it in code for full control and additional possibilities later on.
Simply set the background color of the concerned tableview. In your case that would be something like this:
self.navigationController.view.backgroundColor = [UIColor whiteColor];
Upvotes: 2
Reputation: 1956
I think your issue here has to do with your navigation bar not being transparent. In your view controller, make sure the property Under Opaque Bars is checked and it should be fine.
Another way to doing that is to set extendedLayoutIncludesOpaqueBars
to YES
(not the default) on your view controller.
Upvotes: 22