Skip to content

Instantly share code, notes, and snippets.

@fahied
Created July 12, 2017 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fahied/40c279ffc416662018523415ece837d9 to your computer and use it in GitHub Desktop.
Save fahied/40c279ffc416662018523415ece837d9 to your computer and use it in GitHub Desktop.
iOS: Play youtube video in fullscreen when device orientation is landscape
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
if window == self.window {
return .portrait
} else {
return .allButUpsideDown
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment