Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Separator between navigation bar and view - iOS 7

In iOS 7 there's a grey separator between the navigation bar and the view.

Back in iOS 6, there wasn't that horizontal line, thus the view would blend in with the navigation bar as if they were the same image. Now I don't know how to remove it...

I've tried resizing the view / navigation bar, but it doesn't help. Any ideas?

like image 293
Lord Zsolt Avatar asked Sep 20 '13 16:09

Lord Zsolt


2 Answers

The other answers did not work for me. To remove the separator, I had to set the background image AND the shadow image, like so:

[[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
like image 90
James Harpe Avatar answered Sep 20 '22 15:09

James Harpe


Add this:

[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];

in your AppDelegate.m in the application didFinishLaunchingWithOptions method

like image 37
martin Avatar answered Sep 20 '22 15:09

martin