Last active
April 18, 2018 08:25
-
-
Save zenangst/83bc3109e95baf4e3a15a13801b13089 to your computer and use it in GitHub Desktop.
How to rotate tvOS into portrait mode - Example 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.height, height: UIScreen.main.bounds.width) | |
let window = UIWindow(frame: frame) | |
let transformRotation = CGAffineTransform(rotationAngle: CGFloat(-270) * .pi / 180) | |
window.transform = transformRotation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment