disable portraitUpsideDown on iPhones

This commit is contained in:
Toni Förster 2023-11-25 19:26:44 +01:00
parent eb1dfe69cd
commit 7f19f7aa47
No known key found for this signature in database
GPG Key ID: 292F3E5086C83FC7

View File

@ -86,9 +86,11 @@ public class OrientationTracker {
if accelerometerData.acceleration.y <= -threshold { if accelerometerData.acceleration.y <= -threshold {
return .portrait return .portrait
} }
if accelerometerData.acceleration.y >= threshold {
if UIDevice.current.userInterfaceIdiom == .pad && accelerometerData.acceleration.y >= threshold {
return .portraitUpsideDown return .portraitUpsideDown
} }
return currentDeviceOrientation return currentDeviceOrientation
} }
} }