Skip to content

Instantly share code, notes, and snippets.

@josephzhang23
Created April 14, 2017 15:29
Show Gist options
  • Select an option

  • Save josephzhang23/1e05171f171b488e3be637c074878f22 to your computer and use it in GitHub Desktop.

Select an option

Save josephzhang23/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