4
Edit the device orientation.
The device orientation determines the orientation of the device: portrait, upside down, landscape left, or landscape right.
EXAMPLE

INSTRUCTIONS
EDIT VIEWCONTROLLER.SWIFT
- Open ViewController.swift
- Copy and paste code
EDIT HELLO.XCODEPROJ
- Open Hello.xcodeproj
- Under TARGETS, click Hello or your product name
- Click General tab
- Under Deployment Info, after Device Orientation, check Portrait, check Upside Down, check Landscape Left, check Landscape Right
RUN
- Click Product
- Click Run
CODE
import UIKit
class ViewController: UIViewController
{
override func prefersStatusBarHidden() -> Bool
{
return true
}
override func supportedInterfaceOrientations() -> Int
{
return Int(UIInterfaceOrientationMask.All.rawValue)
}
}