I'm using
let value = UIInterfaceOrientation.landscapeRight.rawValue
UIDevice.current.setValue(value, forKey: "orientation")
to force the presenting view controller to show in landscape right. This is part of a navigation controller flow. This works as expected, but if the phone is held in landscape and titled between 45 and 90 degrees the view will present in portrait. The method is called and the expected value is correct, but no change to landscape occurs. This can be reproduced in a bare bones project with a navigation controller.
Does anyone have any idea what might cause this behavior?