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];