Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10435] ios: postlayout not called upon orientation

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-07-06T21:30:02.000+0000
Affected Version/sRelease 2.1.0, Release 2.1.1
Fix Version/sn/a
ComponentsiOS
Labelscore
ReporterMartin Guillon
AssigneeEric Merriman
Created2012-08-12T01:53:04.000+0000
Updated2017-07-06T21:30:05.000+0000

Description

When rotating the phone, postlayout event is not fired even if the center/size changed
var win = Ti.UI.createWindow({
    backgroundColor:'white',
    orientationModes:[ Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT, Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT ]
});

var cropRectView = Ti.UI.createView({
    width:'10%',
    height:'10%',
    left:10,
    backgroundColor:'#5500ff00',
    borderWidth:2,
    borderColor:'white'
});

win.addEventListener('postlayout', function(e){
    Ti.API.info('postlayout')
});

win.add(cropRectView);
win.open();

Comments

  1. jithinpv 2013-03-27

    Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
  2. jithinpv 2013-06-21

    Issue reproduces Tested with iOS SDK: 5.1 iOS iPhone Simulator: 5.1 Mac OS X Version 10.7.5 Titanium SDK version 3.1.1.v20130606121419 Titanium Studio, build: 3.0.1.201212181159
  3. Lee Morris 2017-07-06

    Postlayout is called in the console log and I am unable to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1 GA Appc NPM 4.2.9 Appc CLI 6.2.2 Ti CLI 5.0.14 Alloy 1.9.11 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source