I have an app that sometimes needs its navigation bar to blend in with the content.
Does anyone know how to get rid of or to change color of this annoying little bar?
On the image below situation i have - i'm talking about this 1px height line below "Root View Controller"
Here is an way to do it without using any images, this is the only way that worked for me:
Unfortunately, you need to do this on every file where you want the line not to appear. There's no way to do it this way in
appDelegate
.Edit:
Setting the
shadowColor
tonil
isn't needed, this is the only line that you'll need.I use a UINavigationBar extension that enables me to hide/show that shadow using the UIAppearance API or selecting which navigation bar has to hide/show that shadow using Storyboard (or source code). Here is the extension:
Now, to disable the shadow across all navigation bars you have to use:
Or you can enable/disable this behavior using storyboards:
You should add a view to a bottom of the UISearchBar
Within AppDelegate, this has globally changed the format of the NavBar:
Haven't managed to implement anything different on a specific VC, but this will help 90% of people
Here's a very simple solution:
Did it for me
[UIColor blackColor]
might be your background color, andtabviewController
is yourUITabBarController
if you are using it!