{ "id": "63090", "key": "TIMOB-2458", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "12076", "description": "Mobile @ HQ Week", "name": "Sprint 2011-36", "archived": true, "released": true, "releaseDate": "2011-09-12" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-10-27T15:17:05.000+0000", "created": "2011-04-15T03:20:18.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "ipad", "module_orientation", "orientation", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-08-30T09:11:56.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

Hi, everbody
\r\nI have a serious problem in iPad orientation.

\r\n

This error ocurred in 1.4.3 and 1.5.0 (11/29/2010).

\r\n

My app has this code:

\r\n
\r\nvar win = Ti.UI.createWindow({\r\n    backgroundImage: 'img/bkg.png',\r\n    orientationModes: [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT, Ti.UI.LANDSCAPE_RIGHT, Ti.UI.LANDSCAPE_LEFT]\r\n});\r\n
\r\n

and in tiapp.xml:

\r\n
\r\n<orientations device=\"ipad\">\r\n            <orientation>Ti.UI.PORTRAIT</orientation>\r\n            <orientation>Ti.UI.UPSIDE_PORTRAIT</orientation>\r\n            <orientation>Ti.UI.LANDSCAPE_LEFT</orientation>\r\n            <orientation>Ti.UI.LANDSCAPE_RIGHT</orientation>\r\n        </orientations>\r\n
\r\n

My app start normal in Portrait, and rotate normal, but if i put\r\niPad on Landscape before, and open my app, it show a landscape\r\nsplash and switch to a portrait window in landscape mode.

\r\n

Creating a window that is cut down and with black border the\r\nside.

\r\n

Sorry for my poor english, i'm Brazilian.

{html}", "attachment": [ { "id": "22835", "filename": "OrientationTest.zip", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-09-06T17:06:01.000+0000", "size": 1581804, "mimeType": "application/zip" }, { "id": "18623", "filename": "photo 1.PNG", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-02T14:04:28.000+0000", "size": 25196, "mimeType": "image/png" }, { "id": "18624", "filename": "photo 2.PNG", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-02T14:04:28.000+0000", "size": 25179, "mimeType": "image/png" } ], "flagged": false, "summary": "iPad Orientation Bug on start", "creator": { "name": "adriano", "key": "adriano", "displayName": "Adriano Paladini", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "adriano", "key": "adriano", "displayName": "Adriano Paladini", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "128520", "author": { "name": "adriano", "key": "adriano", "displayName": "Adriano Paladini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hi, i teste the final version of 1.5.0 and now this was\ncorrected.

{html}", "updateAuthor": { "name": "adriano", "key": "adriano", "displayName": "Adriano Paladini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:20:18.000+0000", "updated": "2011-04-15T03:20:18.000+0000" }, { "id": "128521", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Going to mark this resolved, test submitted to internal\ntests.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:20:18.000+0000", "updated": "2011-04-15T03:20:18.000+0000" }, { "id": "128522", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

Sorry to reopen, but this is still happening.

\n

Changed tiapp.xml to:

\n
\n<iphone>\n        <orientations device=\"ipad\">\n            <orientation>Ti.UI.LANDSCAPE_LEFT</orientation>\n            <orientation>Ti.UI.LANDSCAPE_RIGHT</orientation>\n        </orientations>\n</iphone>\n
\n

The build/iphone/ directory was emptied before testing.

\n

Tested on iPad Simulator with iPad-KS
\nTi API 1.6 (Feb 4 2011 17:12 r349debe8)

\n

Please refer to this HD ticket for details:
\nhttp://developer.appcelerator.com/helpdesk/view/71251#c336281

{html}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:20:19.000+0000", "updated": "2011-04-15T03:20:19.000+0000" }, { "id": "128523", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This is not a bug. Apple's documentation specifies that the\nfirst orientation listed in the Info.plist, when enforced, is the\norientation that your app is forced into before starting. This is\nnot something we can change.

\n

IN ORDER TO GET AROUND THIS:

\n
{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:20:19.000+0000", "updated": "2011-04-15T03:20:19.000+0000" }, { "id": "128524", "author": { "name": "ygorlemos", "key": "ygorlemos", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Ok. But how can I do it for a SplitView app ? Will it work on\n1.5.1 ?

{html}", "updateAuthor": { "name": "ygorlemos", "key": "ygorlemos", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:20:19.000+0000", "updated": "2011-04-15T03:20:19.000+0000" }, { "id": "128525", "author": { "name": "ygorlemos", "key": "ygorlemos", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Also this does not change the fact that splitWindow is not\nobeying orientation... even when you set it explicitly, iPad keeps\nrotating the screen:

\n

splitWin = Ti.UI.iPad.createSplitWindow({

\n
\nmasterView:poteTMS.masterNav,\ndetailView:poteTMS.detailNav,\norientationModes:[ Titanium.UI.LANDSCAPE_LEFT,Titanium.UI.LANDSCAPE_RIGHT ]\n
\n

});

\n

Even with this piece of code on app.js and the proposed\nworkaround, the window turns around with accelerometer...

\n

Tested under 1.5.1 and continuous build\n1.6.0-20110204141203-osx

{html}", "updateAuthor": { "name": "ygorlemos", "key": "ygorlemos", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:20:19.000+0000", "updated": "2011-04-15T03:20:19.000+0000" }, { "id": "128526", "author": { "name": "ygorlemos", "key": "ygorlemos", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

As for Apple official iOS4 Documentation:

\n
\n

A split view controller relies on its two view controllers to\ndetermine whether interface orientation changes should be made. If\none or both of the view controllers do not support the new\norientation, no change is made. This is true even in portrait mode,\nwhere the first view controller is not displayed. Therefore, you\nmust override the shouldAutorotateToInterfaceOrientation: method\nfor both view controllers and return YES for all supported\norientations.

\n
\n

So the override is not being made I guess...

\n

Reference: (https://developer.apple.com/library/ios/#featuredarticles/ViewContr...)

{html}", "updateAuthor": { "name": "ygorlemos", "key": "ygorlemos", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:20:19.000+0000", "updated": "2011-04-15T03:20:19.000+0000" }, { "id": "128527", "author": { "name": "ygorlemos", "key": "ygorlemos", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Nevermind, what you got to do is the following:

\n

On tiapp.xml you need:

\n
\n<orientations device=\"ipad\">\n    <orientation>Ti.UI.LANDSCAPE_LEFT</orientation>\n    <orientation>Ti.UI.LANDSCAPE_RIGHT</orientation>\n</orientations>\n
\n

On your splitWindow declaration, you need:

\n
\nxxx.splitView = Ti.UI.iPad.createSplitWindow({\n    masterView: xxx.masterNav,\n    detailView: xxx.detailNav,\n    orientationModes:[ Ti.UI.LANDSCAPE_LEFT,Ti.UI.LANDSCAPE_RIGHT ]\n});\n
\n

And -on both- your views / windows (master and detail),\nyou need:

\n
\nxxx.masterWindow = Ti.UI.createWindow({\n    title:'Nav Menu',\n    backgroundColor:'#e8ecef',\n    orientationModes:[ Ti.UI.LANDSCAPE_LEFT,Ti.UI.LANDSCAPE_RIGHT ]\n});\n
\n

Setting orientationModes on splitWindow, master and detail views\n/ windows now forces the splitWindow based app to never rotate.

\n

This should be documented...

\n

Thanks.

{html}", "updateAuthor": { "name": "ygorlemos", "key": "ygorlemos", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:20:20.000+0000", "updated": "2011-04-15T03:20:20.000+0000" }, { "id": "128528", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Even with everything listed above set, if you start the\napplication in Portrait mode (when only landscape is available),\nthe first time it loads, you still get a split second rotation that\nshouldn't happen.

\n

View here: http://screencast.com/t/71qQBMM7G

\n

Testing on device, built with 1.6RC1

\n

Reference Ticket: http://developer.appcelerator.com/helpdesk/view/74261

{html}", "updateAuthor": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:20:22.000+0000", "updated": "2011-04-15T03:20:22.000+0000" }, { "id": "128529", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This might be an apple bug, have to move it to TBS.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:20:22.000+0000", "updated": "2011-04-15T03:20:22.000+0000" }, { "id": "132805", "author": { "name": "rpfeiffer", "key": "rpfeiffer", "displayName": "Ralf Pfeiffer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "There is unclarity on this issue, so we will push to reevaluate this in next release's planning process. ", "updateAuthor": { "name": "rpfeiffer", "key": "rpfeiffer", "displayName": "Ralf Pfeiffer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-26T16:25:20.000+0000", "updated": "2011-04-26T16:25:20.000+0000" }, { "id": "134734", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Another repro case. If you set the orientation to Portrait only in tiapp.xml and then run the code below. When you start the app, hold the iPad up in landscape(it does not do it consistently if it is laying down). You will see that the navBar does not go to the top where it should. You will see the screen rotate (would rather not see this) and then the navBar will be set down from where it should be (see attached pictures).\n\n{code:title=\"tiapp.xml}\n\n\tTi.UI.PORTRAIT\n\n{code}\n\n{code:title=\"app.js\"}\nTitanium.UI.setBackgroundColor('#f00');\n\t\nvar mainWin = Titanium.UI.createWindow({\n\torientationModes:[Titanium.UI.PORTRAIT]\n});\n\nvar mainMenuWin = Titanium.UI.createWindow({\n\ttitle: \"I'm the navBar - too low!!\",\n\tbackgroundColor:\"#00f\"\n});\nvar nav = Titanium.UI.iPhone.createNavigationGroup({\n\twindow: mainMenuWin\n});\nmainWin.add(nav);\n\nmainWin.open();\nmainWin.addEventListener('open', function(e){\n\tsetTimeout( function(){\n\t\t// mainWin.add(nav);\n\t}, 500);\n});\n{code}\n\nh3. Workaround\nAdd your elements to the window a short amount of time after the window opens.\n{code:javascript}\nmainWin.addEventListener('open', function(e){\n\tsetTimeout( function(){\n\t\tmainWin.add(nav);\n\t}, 500);\n});\n{code}\n\nh3. Tested With\nTiSDK 1.7.0.RC1\niPad 1 3.2.2\n\nh3. Associated Helpdesk Ticket\nhttp://appc.me/c/APP-521248\n", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-02T14:02:53.000+0000", "updated": "2011-06-02T14:02:53.000+0000" }, { "id": "157874", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3.2 only - not seen on newer revs of OS - 1.7.2.v20110624152637", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-27T14:21:54.000+0000", "updated": "2011-06-27T14:21:54.000+0000" }, { "id": "157875", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Confirmed to appear only on 3.2 devices. Pre-4.0 support is being dropped for release 1.8.0, and there is no reason to keep an iPad device at a version below 4.2.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-27T14:30:05.000+0000", "updated": "2011-06-27T14:30:05.000+0000" }, { "id": "165141", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Reopening.\r\n\r\nh3. tiapp.xml\r\n{code}\r\n\r\n\tTi.UI.PORTRAIT\r\n\tTi.UI.UPSIDE_PORTRAIT\r\n\tTi.UI.LANDSCAPE_LEFT\r\n\tTi.UI.LANDSCAPE_RIGHT\r\n\r\n{code}\r\nh3. app.js\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor:'#fff',\r\n orientationModes:[\r\n Titanium.UI.LANDSCAPE_LEFT,\r\n Titanium.UI.LANDSCAPE_RIGHT,\r\n Titanium.UI.PORTRAIT,\r\n Titanium.UI.UPSIDE_PORTRAIT,\r\n ]\r\n});\r\n\r\n\r\nvar label = Ti.UI.createLabel({\r\n text:'Hello World',\r\n width:'auto',\r\n height:'auto'\r\n});\r\n\r\nwin.add(label);\r\n\r\nwin.open();\r\n{code}\r\nh3. To Reproduce:\r\n\r\nLaunch app in any orientation besides portrait.\r\n\r\nh3. Expected behavior:\r\n\r\nThe app launches in it's current orientation mode.\r\n\r\nh3. What really happens:\r\n\r\nThe app launches always in portrait.\r\n\r\nEnvironment:\r\n{code}\r\niPad Simulator 4.3\r\niPad device 4.3.3\r\nTi SDK 1.8.0.v20110906105416\r\n{code}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-09-06T14:50:08.000+0000", "updated": "2011-09-06T14:50:08.000+0000" }, { "id": "166103", "author": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolved by https://github.com/appcelerator/titanium_mobile/pull/464.\r\n", "updateAuthor": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-14T16:06:22.000+0000", "updated": "2011-09-14T16:06:22.000+0000" }, { "id": "166184", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fix verified on iPad 4.3.5 and iPad 2 4.3.5.\n\nSDK used for testing: 1.8.0v20110915101349", "updateAuthor": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-15T11:01:54.000+0000", "updated": "2011-09-15T11:01:54.000+0000" } ], "maxResults": 22, "total": 22, "startAt": 0 } } }