问题
In my application I do have two viewControllers:
VideoListViewController - portrait only
VideoPlayerViewController - landscape only
VideoListViewController opens VideoPlayerViewController via self.present(viewController...)
I'm blocking orientations via:
override var supportedInterfaceOrientations: UIInterfaceOrientationMask 
{
    return .portrait
}
My problem is that portrait only view receives the landspace safe area...
On my VideoListViewController.layoutSubviews I printed self.safeAreaLayoutGuide.layoutFrame and it works as expected at first returning {{0, 44}, {375, 734}} (portrait mode), but then when the VideoPlayer appears in landspace rotation my portrait-only viewController gets {{44, 0}, {287, 791}}
Effect is that for a slight moment old view updates ignoring safe area and it fixes itself when ViewPlayerViewController disappears.
Did anyone had this problem ? Is there any workaround for this ?
来源:https://stackoverflow.com/questions/46933337/safearealayoutguide-returning-wrong-values-on-blocked-rotation