mobileLockOrientation

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
mobileLockOrientation
Synonymsiphonelockorientation
Summary

Temporarily prevents orientation changes.

Introduced4.5.3
OSios, android
Platformsmobile
Example
mobileLockOrientation
if loading then mobileLockOrientation
RelatedCommand: mobileSetAllowedOrientations, mobileUnlockOrientation
Function: mobileDeviceOrientation, mobileOrientationLocked, mobileAllowedOrientations, mobileOrientation
Message: orientationChanged
Description

Use the mobileLockOrientation command to temporarily prevent orientation changes.

The mobileLockOrientation command temporarily prevents orientation changes, for example while your application is performing a task and you do not want the orientation to change until the task is complete.

The orientation lock can be nested, and when an unlock request causes the nesting to return to zero, the interface rotates to match the device's current orientation (assuming it is in the set of allowed orientations). You can query the current orientation lock state with the mobileOrientationLocked function.