Skip to content

Instantly share code, notes, and snippets.

@josephchang10
Created April 14, 2017 15:29
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 josephchang10/1e05171f171b488e3be637c074878f22 to your computer and use it in GitHub Desktop.
Save josephchang10/1e05171f171b488e3be637c074878f22 to your computer and use it in GitHub Desktop.
Setting device orientation in Swift iOS
override var prefersStatusBarHidden: Bool {
return true
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
return [UIInterfaceOrientationMask.portrait, UIInterfaceOrientationMask.portraitUpsideDown]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment