Created
July 3, 2012 14:37
-
-
Save iskugor/3040125 to your computer and use it in GitHub Desktop.
Titanium: Crazy "postlayout" event
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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