Public Sub SetSupportedOrientation(Orientation As Int)
Private wrk_osversion As String
wrk_osversion = App.OSVersion & "."
wrk_osversion = wrk_osversion.SubString2(0, wrk_osversion.IndexOf("."))
'setNeedsUpdateOfSupportedInterfaceOrientations is only supported from iOS 16 on...
If wrk_osversion >= 16 Then
mOrientation = Orientation
If App.KeyController <> Null Then
App.KeyController.As(NativeObject).RunMethod("setNeedsUpdateOfSupportedInterfaceOrientations", Null)
End If
End If
End Sub