iOS Device orientation confusion!
Richard Gaskin
ambassador at fourthworld.com
Wed Apr 12 20:40:40 EDT 2023
Henry Lowe wrote:
> The problem is that when the iPhone is in Landscape Left mode
> (according to the simulator and to Apple’s definition of that mode
> - see below), Livecode is returning Landscape Right. When the
> device is in Landscape Right mode, Livecode returns Landscape
> Left - via the MobileDeviceOrientation function.
>
> Apple’s Definition (developer.apple.com <http://developer.apple.com/>)
> of these two modes:
>
> • LandscapeLeft:
> The device is in landscape mode, with the device held upright and
> the front-facing camera on the left side.
>
> • LandscapeRight:
> The device is in landscape mode, with the device held upright and
> the front-facing camera on the right side.
>
>
> Livecode’s Definition (Dictionary):
>
> • landscape left: the device is being held upward with the home button
> on the left
>
> • landscape right: the device is being held upward with the home
> button on the right
>
> It would appear that these two definitions at odds with each other.
They are indeed at odds. Apple should update their description to match
LC's. :)
They seem consistent with one another, except that each uses a part of
the hardware at opposite ends of the phone to define orientation.
Apple's docs are referencing the camera as the point of reference for
orientation, while LC uses the Home button as the point of reference. So
while "left" and "right" are used differently, you should be able to get
the result you need in LC.
Use Apple's spec when coding in Apple tools and languages, and LC's when
writing in LC and you should be fine.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list