I have included the need for a navbar (navigationController) with the same tint of the background of the bar viewController ... Now I have a problem ... Between the navbar and the view I have a horizontal line that separates them, as you can see from the picture .. Can you tell me how can I delete this line horizontal black and make it more consistent?
I tried this in AppDelegate:
[[UINavigationBar appearance] setShadowImage: [[UIImage alloc] init]];
UINavigationController * nav = (UINavigationController *) self.window.rootViewController; nav.navigationBar.translucent = NO;
But I did not get results. Can you help? Thanks to all of Rory.
You also have to set background image for navigation bar in order to achieve your requirement
[[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
You can hide it by using following code :
UIView *overlayView = [[UIView alloc] initWithFrame:CGRectMake(0, 43, 320, 1)];
[overlayView setBackgroundColor:[UIColor whiteColor]];
[navBar addSubview:overlayView]; // navBar is your UINavigationBar instance
[overlayView release];
Here is Ref : How to remove UINavigatonItem's border line
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With