Example code using postlayout in Titanium 3.x (Alloy) :
View:
<Alloy>
<Window class="container">
<Label id="testLabel" onClick="doClick">Hello, World</Label>
<ImageView id="testImgView" autoStyle="true" ></ImageView>
</Window>
</Alloy>
Controller:
$.testLabel.addEventListener('postlayout', function(e) {
Ti.API.info('Label postlayout working!');
});
$.testImgView.image='default.png';
$.testImgView.addEventListener('postlayout', function(e) {
Ti.API.info('Img postlayout working!');
});
$.index.open();
Result:
[INFO][TiAPI ( 2188)] Label postlayout working!