Reputation: 5084
I'm trying to add an overlay view (addSubview
) and have it "extend" the status bar + navigationBar
So I made a xib that has a red view, with a constraint of Top alignment of 64.
Still I have black line between the status bar and the red view (see image)
If I change the constraint to less - the red view in under the status bar, but still there is a black line.
The code that adds the view:
overlaySearchView = [[[NSBundle mainBundle] loadNibNamed:@"searchView" owner:self options:nil] objectAtIndex:0];
overlaySearchView.frame = [[UIScreen mainScreen] bounds];
// overlaySearchView.frame = self.view.bounds; //tried both
[[self view] addSubview:overlaySearchView];
Upvotes: 0
Views: 214
Reputation: 222
See answer here: How to hide iOS7 UINavigationBar 1px bottom line
What you are seeing is the shadow of the navigation bar, rather than a gap between the two views.
Upvotes: 1
Reputation: 10938
What about trying to modify your self.navigationController.navigationBar.frame.size.height
?
If that works you can then add a custom navigationItem.titleView
with all your other views in it.
Upvotes: 0
Reputation: 593
please select the view controller and in attribute inspector tab check/uncheck
Hope it helps!
Upvotes: 0