Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27886] iOS: Counter does not start of at 0 and different iOS versions return different results

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 9.0.0, Release 9.0.2, Release 9.1.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterSamir Mohammed
AssigneeUnknown
Created2020-05-07T11:55:45.000+0000
Updated2020-05-07T11:57:44.000+0000

Description

With the following test case the counter starts of at '2' on iOS 13.4 and and starts at '1' using iOS 12.2 (Tested on iPad and iPhone Sims). The counter should be starting at 0 and only changing when an orientation has been made. *Test Case:*
var win = Ti.UI.createWindow({
    backgroundColor: 'white',
});
var label = Ti.UI.createLabel({
    text: 'Height: 0, Count: 0',
    textAlign: 'center'
})
var rotateCount = 0;
Ti.Gesture.addEventListener('orientationchange', function (e) {
      console.log('Height: ' + Ti.Platform.displayCaps.platformHeight);
      rotateCount++;
      label.text = 'Height: ' + Ti.Platform.displayCaps.platformHeight + ', Count: ' + rotateCount;
});
win.add(label);
win.open();
*Expected result* Counter should start of at 0 *Actual result* iOS 13.4 - Counter starts at 2 iOS 12.2 - Counter starts at 1

Comments

No comments

JSON Source