iOS forcing interface rotation
Björnke von Gierke
bvg at mac.com
Sun Nov 13 05:57:31 EST 2011
I'm not developing in iOS, but this intrigued me. It seems you can't force a reorientation (feature request?), but you can force a lock, by using the iphoneSetAllowedOrientations with a single entry, if the user then rotates the device, the new restrictions will be adhered after that point. However, it seems not to be possible to force the device to receive an orientation refresh by script.
--random step during my testing
on mouseUp
--iphoneLockOrientation
put iphoneAllowedOrientations() into prevAllowed
put iphoneDeviceOrientation() into theCurr
if theCurr contains "landscape" then
put "portrait" into theNew
else
put "landscape left" into theNew
end if
iphoneSetAllowedOrientations theNew
--maybe its possible to set iphoneOrientation()?
--nope does nothing
--put iphoneOrientation(theNew)
--reset and force a redraw? nope, doesn't help it seems
iphoneSetAllowedOrientations theCurr
--iphoneUnlockOrientation
end mouseUp
On 13 Nov 2011, at 00:19, Scott Morrow wrote:
> Hello Hugh,
>
> I don't believe LC provides a way to do this. At one point I created an animation that took over the screen and prompted the user to rotate the device. That was the best I could come up with.
>
> -Scott Morrow
>
> On Nov 10, 2011, at 7:46 AM, FlexibleLearning wrote:
>
>> Did anyone figure how to do this? I need exactly the same thing: All stack
>> windows are landscape, except 1 which must be portrait.
>>
>> How do we force an orientation change without requiring the user to
>> physically rotate the device?
>>
>> Hugh Senior
>> FLCo
>>
>>
>>
>> On Tue Aug 2 09:23:51 CDT 2011 Scott Morrow wrote:
>>
>> I am working with an iOS UI that allows portrait and landscape rotation on
>> one card but requires that the UI be presented in portrait on all other
>> cards. no matter what the actual device rotation is. The problem arises
>> when leaving the card that allows landscape and going to a card that
>> requires portrait. If the user navigates to a "portrait only" card with
>> device already in landscape, the UI is skewed. Is there a way to force the
>> auto-rotation without requiring the user to physically rotate the device?
>> (I had hoped perhaps some trickery with mobileSetAllowedOrientations and
>> mobileLockOrientation /mobileUnlockOrientation.)
>>
>> TIA,
>>
>> Scott Morrow
>>
>> Elementary Software
>> (Now with 20% less chalk dust!)
>> web http://elementarysoftware.com/
>> email scott at elementarysoftware.com
>> ------------------------------------------------------
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
--
Watch live presentations every Saturday:
http://livecode.tv
Use an alternative Dictionary viewer:
http://bjoernke.com/bvgdocu/
Chat with other RunRev developers:
http://bjoernke.com/chatrev/
More information about the use-livecode
mailing list