Xcode: getting rid of black bar when hiding navbar
Scenario
I have an application that allows users to scroll to the top of a UITableView to view messages. When they scroll up, the navigation bar will hide. I am using the code from the following SO post ...
Mimic iOS 7 Facebook Hides / Shows Expanding / Shrinking Navigation Bar
Problem
When I tried the first answer there, it worked the first time I used it, great. After I got it where it worked, I tried to pull my tabulator out. When I fidgeted with my code, I must have faked something. Because now when I run the same code, I get this black bar that won't go away.
Unallocated (regular)
Scrolled Up (leaves an ugly black streak)
What I have also tried
GTScrollNavigationBar and TLYShyNavBar
and they both leave a black streak as well ...
Question
Does anyone know how to fix this?
source to share
I think your problem here is because your navigation bar is not transparent. In your view controller, make sure the Under Opaque Bars property is checked and everything should be fine.
Another way to do this is to set extendedLayoutIncludesOpaqueBars
to YES
(not the default) on your view controller.
source to share