Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14483] iOS: Ti.Gesture.isPortrait() returns true even during landscape mode

GitHub Issuen/a
TypeBug
PriorityLow
StatusReopened
ResolutionUnresolved
Affected Version/sRelease 3.1.0, Release 3.1.1
Fix Version/sn/a
Componentsn/a
Labelsgesture, orientation
ReporterMatej
AssigneeUnknown
Created2013-06-30T21:50:38.000+0000
Updated2018-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();

Comments

  1. Daniel Sefton 2013-07-03

    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.

JSON Source