Skip to content

Instantly share code, notes, and snippets.

@iskugor
Created July 3, 2012 14:37
Show Gist options
  • Save iskugor/3040125 to your computer and use it in GitHub Desktop.
Save iskugor/3040125 to your computer and use it in GitHub Desktop.
Titanium: Crazy "postlayout" event
var win = Ti.UI.createWindow({
backgroundColor: '#000',
layout: 'vertical',
    navBarHidden: true
});
var button = Ti.UI.createButton({
title: 'Add table'
});
win.add(button);
var label = Ti.UI.createLabel({ text: 'Something ...', height: Ti.UI.SIZE, width: Ti.UI.FILL });
win.add(label);
button.addEventListener('postlayout', function(e) {
Ti.API.info('Button postlayout');
});
label.addEventListener('postlayout', function(e) {
Ti.API.info('Label postlayout');
});
win.addEventListener('postlayout', function(e) {
Ti.API.info('Window postlayout');
});
  
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment