mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 00:08:21 +00:00
disable portraitUpsideDown on iPhones
This commit is contained in:
parent
eb1dfe69cd
commit
7f19f7aa47
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user