Sunday, April 22, 2012

IPad Landscape Orientation on HaXe NME

When using landscape orientation in the nmml file for an nme project targetting iPad there is a problem where lib.current.stage.stageheight and stagewidth are still referring to portrait coordinates.

To fix this add an if statement to swap the two values before you use them.




Resources:

Some usage of screeRotated and Lib.current.stage dealing with iOS landscape mode in HaXe+NME:
http://www.haxenme.org/community/forums/programming-with-haxe/how-do-we-create-a-landscape-app-in-ios/

 XCode discussion forum regarding native documentation of iOS landscape mode:
http://forums.macrumors.com/showthread.php?t=548780

Thread discussing NME ios target and overriding the stage.shouldRotateInterface function for proper landscape handling:
http://markmail.org/message/agch7dhnsdyn4soz

Automatic scaling in NME for custom transition between iPad and iPhone:
http://www.haxenme.org/community/forums/programming-with-haxe/auto-scaling-between-ipad-and-iphoneipod-devices/

Talk from the NME author in a thread: "It seems that if you target iOS 3.2, you can submit with armv6, but if you target iOS 4 or 5 (not sure about 4... definitely 5) the App Store will reject your application if it lacks armv7."
http://www.haxenme.org/community/forums/bugs/keyboard-orientation/?ccm_paging_p=2

 Thread containing information regarding GM2D HaXe game engine library and how it handles iOS landscape mode:
http://haxe.org/forum/thread/3395#nabble-td6459323

Discussion of landscape mode debugging with Haxe+NME on Android:
http://haxe.org/forum/thread/3395#nabble-td6685716

1 comment:

  1. Has anyone succeeded in getting the landscape orientation mode to work
    for an iPad? I set the orientation parameter in my .nmml file to
    landscape, but this doesn't seem to do anything. Fiddling with the
    Xcode supported device orientations similarly didn't have an effect. And i want to know is there an app can scan 2d barcode in excel on ipad?

    ReplyDelete