I was wondering how I can get the current device orientation in Swift? I know there are examples for Objective-C, however I haven\'t been able to get it working in Swift.
override func willRotateToInterfaceOrientation(toInterfaceOrientation: UIInterfaceOrientation, duration: NSTimeInterval) { if (toInterfaceOrientation.isLandscape) { NSLog("Landscape"); } else { NSLog("Portrait"); } }