[TIMOB-1123] Orientation Change not working correctly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:55:16.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.4.0 |
Components | iOS |
Labels | defect, ios, iphone, mode, orientation |
Reporter | ctredway |
Assignee | Reggie Seagraves |
Created | 2011-04-15T02:44:37.000+0000 |
Updated | 2011-04-17T01:55:16.000+0000 |
Description
In sdk 1.3.1 the first orientation change is not honored when setting the orientation mode to PORTRAIT only. The code below shows that the window rotates to landscape on the first rotation only, then it follows what was set in orientation modes. Just a note: this is holding up the app of the customer that found this.
// this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor('#000');
// // create base UI tab and root window // var win1 =
Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
win1.add( Ti.UI.createLabel( { text: 'label to show orientation', top:50, left:10}));
win1.orientationModes =[Ti.UI.PORTRAIT];
win1.orientation = Ti.UI.PORTRAIT;
// open tab group win1.open();
fyi - this holding up a premium customers project.
http://helpdesk.appcelerator.net/tickets/3007">http://helpdesk.appcelerator.net/tickets/3007
In the following (correct) code I'm not seeing any orientation issues:
The window stays in PORTRAIT orientation, even as the device rotates.
Will get some independent confirmation from Blain and determine if the helpdesk ticket is asking something different before closing.
in 1.3.1 this is broken. it may be fixed in head but I have not built from
head.
Could you check in head and see if this was fixed? Blain may actually have done it already as part of another ticket, and I can't reproduce the behavior you seem to be describing.
This issue still exists. The JS above actually demonstrates correct behavior, but the following reproduces the described bug:
Okay, my mistake. This is fixed in HEAD, it must be a duplicate of something Blain did. All I can say is that you should be aware of the difference between PORTRAIT and UPSIDE_PORTRAIT.
I understand. However, our docs are not up to snuff. We have to remember our target audience are not obj-c programmers, so they may not know the difference between PORTRAIT and UPSIDE_PORTRAIT.
I've made a doc change that clarifies this.