Posts in Category "Orientation"

Orientation Changes in AIR 3.5

Apple has made a significant change in the application orientation APIs in the newly released iOS 6 SDK. Some of the auto-orientation callbacks have been completely deprecated in iOS 6 SDK. This means apps packaged with iOS 6 SDK and running on iOS 6 devices will not receive the deprecated callbacks. However the same apps running on iOS 5.1 or earlier will continue to receive the deprecated native callbacks. This change affects the screen orientation API’s in AIR too and support for the new callbacks have been added in AIR 3.5 beta release available here.

Prior to iOS 6 SDK, native orientation callbacks informed the application about the new orientation it was being rotated to. Hence, an application could decide whether it wanted to rotate to the new orientation or not at runtime. However, the new callbacks do not give us such information.The OS only queries the application about the set of orientations it currently supports. If the new orientation that the application is being rotated to is one of these values, the application rotates automatically. Otherwise it does not. Continue reading…

StageAspectRatio Enhancements in AIR 3.3

One must have come across many mobile applications(mostly games) that remain in landscape orientation across their lifetime. They start in landscape orientations and remain in landscape orientations irrespective of the orientation in which the device is held or moved. A landscape only application should ideally support both landscape orientations namely Landscape_Left and Landscape_Right and should not auto rotate to any portrait orientation if the device is held in one of the portrait orientations.

Prior to AIR 3.3, StageAspectRatio supported two public constants PORTRAIT and LANDSCAPE. Using one of these values in the aspectRatio tag in the application descriptor would only lead to the application opening up in PORTRAIT or LANDSCAPE orientation respectively. However, the Stage would re-orient in all orientations as per the new device orientation. For example:- with StageAspectRatio set to PORTRAIT, an app would open in PORTRAIT orientation but would reorient to LANDSCAPE_LEFT orientation when device orientation was changed to LANDSCAPE_LEFT.

Continue reading…