[TIMOB-879] orientationModes not effective on ipad
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:54:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.4.0 |
Components | iOS |
Labels | ipad, orientationmodes |
Reporter | Justin Vincent |
Assignee | bfreedman (at appcelerator) |
Created | 2011-04-15T02:38:26.000+0000 |
Updated | 2011-04-17T01:54:32.000+0000 |
Description
Put this in app.js
Titanium.UI.iPhone.statusBarHidden = true;
var webView = Titanium.UI.createWebView({url:'http://google.com'})">http://google.com'});
var win = Titanium.UI.createWindow({fullscreen: true});
win.orientationModes = [
Titanium.UI.PORTRAIT,
Titanium.UI.UPSIDE_PORTRAIT
];
win.add(webView);
win.open();
I know that there would be no reason to limit orientationModes for displaying google.
However, I am building a two player board game (like chess) in HTML/JavaScript.
The idea is to replicate a real board with both players sitting at each end of the ipad. It doesn't make sense for the board to be an any orientation other than portrait - so ideally I need to be able to lock the orientation to PORTRAIT or UPSIDE_PORTRAIT
Hunting through he docs I see there is a way to do this with win.orientationModes, but it doesn't work in the case outlined above.
I wonder if it may be that Titanium.UI.createWebView also needs orientationModes?
I've tested in the simulator and on an ipad, same issue in both places.
Screen shot attached.
Attachments
File | Date | Size |
---|---|---|
screen-shot-2010-05-04-at-30606-pm.png | 2011-04-15T02:38:27.000+0000 | 485392 |