I want to force a device rotation in Swift.
I've read, that this code is supposed to work but it doesn't:
let value = UIInterfaceOrientation.LandscapeRight.rawValue
UIDevice.currentDevice().setValue(value, forKey: "orientation")
Is that maybe an old version or why isn't it working?