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.
To find current device orientation simply use this code:
UIApplication.sharedApplication().statusBarOrientation
for swift 3.0
UIApplication.shared.statusBarOrientation