88import Foundation
99import UIKit
1010
11- @objc public class OrientationDirectorImpl : NSObject {
11+ @objc public class OrientationDirectorImpl : NSObject {
1212 private static let TAG = " OrientationDirectorImpl "
1313
1414 private let bundleManager : BundleManager = BundleManager ( )
@@ -62,16 +62,16 @@ import UIKit
6262
6363 updateIsLockedTo ( value: true )
6464
65- let orientationCanBeUpdatedDirectly = jsOrientation != Orientation . LANDSCAPE;
66- if ( orientationCanBeUpdatedDirectly) {
65+ let orientationCanBeUpdatedDirectly = jsOrientation != Orientation . LANDSCAPE
66+ if orientationCanBeUpdatedDirectly {
6767 updateLastInterfaceOrientationTo ( value: jsOrientation)
6868 return
6969 }
7070
7171 let lastInterfaceOrientationIsAlreadyInLandscape = lastInterfaceOrientation == Orientation . LANDSCAPE_RIGHT || lastInterfaceOrientation == Orientation . LANDSCAPE_LEFT
72- if ( lastInterfaceOrientationIsAlreadyInLandscape) {
72+ if lastInterfaceOrientationIsAlreadyInLandscape {
7373 updateLastInterfaceOrientationTo ( value: lastInterfaceOrientation)
74- return ;
74+ return
7575 }
7676
7777 let systemDefaultLandscapeOrientation = Orientation . LANDSCAPE_RIGHT
@@ -92,20 +92,20 @@ import UIKit
9292
9393 let lastMask = utils. convertToMaskFrom ( jsOrientation: lastInterfaceOrientation)
9494 let isLastMaskSupported = self . supportedInterfaceOrientations. contains ( lastMask)
95- if ( isLastMaskSupported) {
95+ if isLastMaskSupported {
9696 return
9797 }
9898
9999 let supportedInterfaceOrientations = bundleManager. getSupportedInterfaceOrientations ( )
100- if ( supportedInterfaceOrientations. contains ( UIInterfaceOrientationMask . portrait) ) {
100+ if supportedInterfaceOrientations. contains ( UIInterfaceOrientationMask . portrait) {
101101 self . updateLastInterfaceOrientationTo ( value: Orientation . PORTRAIT)
102102 return
103103 }
104- if ( supportedInterfaceOrientations. contains ( UIInterfaceOrientationMask . landscapeRight) ) {
104+ if supportedInterfaceOrientations. contains ( UIInterfaceOrientationMask . landscapeRight) {
105105 self . updateLastInterfaceOrientationTo ( value: Orientation . LANDSCAPE_RIGHT)
106106 return
107107 }
108- if ( supportedInterfaceOrientations. contains ( UIInterfaceOrientationMask . landscapeLeft) ) {
108+ if supportedInterfaceOrientations. contains ( UIInterfaceOrientationMask . landscapeLeft) {
109109 self . updateLastInterfaceOrientationTo ( value: Orientation . LANDSCAPE_LEFT)
110110 return
111111 }
@@ -128,7 +128,7 @@ import UIKit
128128
129129 private func initIsLocked( ) -> Bool {
130130 let supportedOrientations = bundleManager. getSupportedInterfaceOrientations ( )
131- if ( supportedOrientations. count > 1 ) {
131+ if supportedOrientations. count > 1 {
132132 return false
133133 }
134134
@@ -169,11 +169,11 @@ import UIKit
169169
170170 private func adaptInterfaceTo( deviceOrientation: Orientation ) {
171171 let supportsLandscape = self . supportedInterfaceOrientations. contains ( . landscape)
172- if ( isLocked && !supportsLandscape) {
172+ if isLocked && !supportsLandscape {
173173 return
174174 }
175175
176- if ( deviceOrientation == Orientation . FACE_UP || deviceOrientation == Orientation . FACE_DOWN) {
176+ if deviceOrientation == Orientation . FACE_UP || deviceOrientation == Orientation . FACE_DOWN {
177177 return
178178 }
179179
0 commit comments