In my app I want to change the device orientation.
I`ve tried it like in the other question with the same topic:
let value = UIInterfaceOrientation.landscapeRight.rawValue
UIDevice.current.setValue(value, forKey: "orientation")
But this seems only to work if the orientation is already allowed so that the user can change it with rotating the device, and it also change the orientation with an animation. But I want my app to only have one orientation in VC1 and to have only one orientation in VC2. The user should not have influence on the Orientation, and there should no animation. Is this possible?
Sorry for my bad english....
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…