mirror of
https://github.com/yattee/yattee.git
synced 2024-12-14 22:30:32 +05:30
Fix typo
This commit is contained in:
parent
2682e52f5a
commit
7dcba77cf0
@ -76,14 +76,14 @@ public class OrientationTracker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func deviceOrientation(forAccelerometerData accelerometerData: CMAccelerometerData) -> UIDeviceOrientation {
|
private func deviceOrientation(forAccelerometerData accelerometerData: CMAccelerometerData) -> UIDeviceOrientation {
|
||||||
let treshold = 0.55
|
let threshold = 0.55
|
||||||
if accelerometerData.acceleration.x >= treshold {
|
if accelerometerData.acceleration.x >= threshold {
|
||||||
return .landscapeLeft
|
return .landscapeLeft
|
||||||
} else if accelerometerData.acceleration.x <= -treshold {
|
} else if accelerometerData.acceleration.x <= -threshold {
|
||||||
return .landscapeRight
|
return .landscapeRight
|
||||||
} else if accelerometerData.acceleration.y <= -treshold {
|
} else if accelerometerData.acceleration.y <= -threshold {
|
||||||
return .portrait
|
return .portrait
|
||||||
} else if accelerometerData.acceleration.y >= treshold {
|
} else if accelerometerData.acceleration.y >= threshold {
|
||||||
return .portraitUpsideDown
|
return .portraitUpsideDown
|
||||||
} else {
|
} else {
|
||||||
return currentDeviceOrientation
|
return currentDeviceOrientation
|
||||||
|
Loading…
Reference in New Issue
Block a user