how to set device orientation in swift 4
var isStarted:Bool! func returnedOrientation() ->AVCaptureVideoOrientation { var videoOrientation: AVCaptureVideoOrientation! let orientation = UIDevice.current.orientation switch orientation { case .unknown: break case .portrait: videoOrientation = .portrait case .portraitUpsideDown: videoOrientation = ...