Orientation check

Is there a way to know if the user rotates the device without allowing him to change orientation.
I would like to rotate some controls (canvas), so they wont be upside down, but I did not find any solution to check the orientation.

This should help:

declare function NSClassFromString lib “Foundation.Framework” (clsName as CFStringRef) as ptr
declare function currentDevice_ lib “UIKit.framework” selector “currentDevice” (clsRef as ptr) as ptr
declare function orientation_ lib “UIKit.framework” selector “orientation” (obj_id as ptr) as integer
Dim ori As Integer = orientation_(currentDevice_(NSClassFromString(“UIDevice”)))
Select Case ori
Case 0
Case 1
Case 2
Case 3
Case 4
Case 5
Case 6

End Select[/code]

More information here: https://developer.apple.com/reference/uikit/uideviceorientation

Thank you, works well.