I have a problem with my code. My application displays within iOS safe area layout guide, however I'd like to force it to display "outside". I have searched the internet and unfortunately I found only "reverse" problems. I don't use interface builder, all my views I create programmatically. I have a main view controller which starts up automatically with the app and from here I start creating all my stuff. My interface builder just shows this view controller and a view assigned to it. Interestingly, the view appears to be really full screen when viewed in IB.
Yes, I tried turning on/off the "Use Safe Area Layout Guide" option for the view. Also I tried to use topLayoutGuide and bottomLayout guide instead and constrain the main view to them, but it still fails:
- (void)viewDidLoad {
[super viewDidLoad];
UILayoutGuide *margins = self.view.safeAreaLayoutGuide;
[NSLayoutConstraint activateConstraints:@[[self.view.topAnchor constraintEqualToAnchor:self.topLayoutGuide.topAnchor],
[self.view.bottomAnchor constraintEqualToAnchor:self.bottomLayoutGuide.bottomAnchor]
]];
//...
}
This is what I see in the IB:
1) view
2) safe area - I can't get rid of it in any way:
3) result (simulator / real device):
I also did RTFM but a) I'm stupid, b) I'm too tired, c) both
Any help would be appreciated :)