Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
iPhone upside down
// MARK: Allow iPhone to work upside-down
extension ViewController {
// allow the iPhone to work upside down; by default on the iPhone this method returns UIInterfaceOrientationMaskAllButUpsideDown
override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
return UIInterfaceOrientationMask.All

This comment has been minimized.

Copy link
Owner Author

NickAger commented Aug 16, 2016

For Swift 3 it becomes:

override public var supportedInterfaceOrientations: UIInterfaceOrientationMask {
    return [.landscape]

also I found I need to add the above to UINavigationController if the app uses one
and also check "Requires full screen" on the iPad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.