Fix lint issues

This commit is contained in:
Arkadiusz Fal
2023-06-17 14:09:51 +02:00
parent b12933e61d
commit e827b97cd5
40 changed files with 130 additions and 101 deletions

View File

@@ -79,14 +79,16 @@ public class OrientationTracker {
let threshold = 0.55
if accelerometerData.acceleration.x >= threshold {
return .landscapeLeft
} else if accelerometerData.acceleration.x <= -threshold {
return .landscapeRight
} else if accelerometerData.acceleration.y <= -threshold {
return .portrait
} else if accelerometerData.acceleration.y >= threshold {
return .portraitUpsideDown
} else {
return currentDeviceOrientation
}
if accelerometerData.acceleration.x <= -threshold {
return .landscapeRight
}
if accelerometerData.acceleration.y <= -threshold {
return .portrait
}
if accelerometerData.acceleration.y >= threshold {
return .portraitUpsideDown
}
return currentDeviceOrientation
}
}