Reputation: 597
I created my navigation controller programmatically, without storyboard and .nib. I needed to hide it so I used
[navigationController setNavigationBarHidden:YES];
in applicationDidFinishLaunchingWithOptions:
. It looks fine on my root screen but at the top of the second view controller there is a black line at the place of the navigation bar which covers some of my button.
Can someone please explain to me what this is and how I can delete it?
Upvotes: 1
Views: 188
Reputation: 2676
You should set a custom shadow image and use it behind.
From Apple documentation:
For a custom shadow image to be shown, a custom background image must also be set with the setBackgroundImage:forBarMetrics: method. If the default background image is used, then the default shadow image will be used regardless of the value of this property.
Upvotes: 1