Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7923] iOS: Support Ti.UI.Window.orientation

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-07-17T09:25:44.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sRelease 3.0.0, Sprint 2012-20 API, 2012 Sprint 20
ComponentsiOS
Labelsapi, module_window, parity, qe-testadded
ReporterArthur Evans
AssigneePing Wang
Created2012-03-08T00:05:44.000+0000
Updated2013-07-17T09:25:44.000+0000

Description

iOS does not support the Ti.UI.Window.orientation property to determine the current screen orientation. It does support the deprecated Ti.UI.orientation property, which provides the same information, but for parity, this should move to Ti.UI.Window.

Comments

  1. Mike Butler 2012-07-03

    Documentation says Ti.UI.orientation is deprecated, but Ti.UI.Window is undefined on iOS and thus unusable for me. Starting new apps and I have to use a deprecated property - that just doesn't seem right, so this is a +1 for getting this bug sorted. Thanks, Mike.
  2. Ping Wang 2012-09-27

    Test case:
       var win = Ti.UI.createWindow();
       win.open();
       
       Ti.API.info("********** win.orientation = " + win.orientation);
       
    Run the above test case and check the output in the console.
  3. Ping Wang 2012-09-27

    PR https://github.com/appcelerator/titanium_mobile/pull/3061
  4. Blain Hamon 2012-10-02

    Pull merged.
  5. Natalie Huynh 2012-12-04

    Tested with 3.0.0.v20121130200208 on iPhone 4 5.1.1
  6. Priya Agarwal 2013-07-17

    Reopening just to updated label.
  7. Priya Agarwal 2013-07-17

    Updated label. Closing as fixed. Verified with: Studio: 3.1.2.201307121617 Titanium SDK: 3.1.2.v20130710144553 acs:1.0.3 alloy:1.1.3 npm:1.2.14 titanium:3.1.1 titanium-code-processor:1.0.1 OS: OSX 10.8 Device:iPhone Simulator(v6.0) iphone4(v5.1),Nexus7(v4.1) Xcode: 4.5.1 Orientation property working fine.

JSON Source