I present a UIViewController out, which uses autolayout to set the constraints for the sub views inside the view of the view controller. all the constraints are kept in the code, without storyboard or xib.
I add the safeAreaLayoutGuide
inside the code, such as below:
NSLayoutConstraint *const containerViewTopConstraint = [self.containerView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor];
the problem is after I rotating from portrait to landscape, the view.safeAreaLayoutGuide didn't get updated. which is still the old safeAreaLayoutGuide in the portrait. wonder if I miss something? Thanks!