[TIMOB-14483] iOS: Ti.Gesture.isPortrait() returns true even during landscape mode
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Reopened |
Resolution | Unresolved |
Affected Version/s | Release 3.1.0, Release 3.1.1 |
Fix Version/s | n/a |
Components | n/a |
Labels | gesture, orientation |
Reporter | Matej |
Assignee | Unknown |
Created | 2013-06-30T21:50:38.000+0000 |
Updated | 2018-02-28T20:03:44.000+0000 |
Description
*Problem*
Ti.Gesture.isPortrait() doesn't work properly.
*Steps to reproduce*
1. Turn on application (PORTRAIT)
2. Press home button
3. Change orientation to LANDSCAPE
4. Turn on application and console will show:
Twice value TRUE for isPortrait()
*Test case*
var win = Ti.UI.createWindow();
Ti.Gesture.addEventListener("orientationchange", function(e) {
console.log("Ti.Gesture.isPortrait() ---> " + Ti.Gesture.isPortrait());
});
Ti.Gesture.fireEvent("orientationchange");
win.open();
My apologies, I didn't follow the steps correctly. I can in fact confirm this. Tested with both 3.1 GA and 3.1.1 GA on iOS 6 simulator. isPortrait() returns true when returning to the app from the background after rotating to landscape.