Last active
January 30, 2018 18:31
-
-
Save meyusufdemirci/e403d85a03391b0f15fbf9f983656bc1 to your computer and use it in GitHub Desktop.
This file contains 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
@objc func onRotated() { | |
// portrait | |
if UIDeviceOrientationIsPortrait(UIDevice.current.orientation) { | |
playerController.view.frame = CGRect(x: 0, y: 200, width: UIScreen.main.bounds.width, height: 250) | |
} | |
// landscape | |
else if UIDeviceOrientationIsLandscape(UIDevice.current.orientation) { | |
playerController.view.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment