I use
let value = UIInterfaceOrientation.landscapeRight.rawValue UIDevice.current.setValue(value, forKey: "orientation")
to make the display controller view appear in landscape mode. This is part of the navigation controller thread. This works as expected, but if the phone is held in the landscape and called between 45 and 90 degrees, the view will be presented in the portrait. The method is called and the expected value is correct, but the landscape does not change. This can be reproduced in a bare-bone project with a navigation controller.
Does anyone know what might cause this behavior?
source share