Skip to content

Instantly share code, notes, and snippets.

@yanguango
Created December 23, 2010 11:32
Show Gist options
  • Save yanguango/752855 to your computer and use it in GitHub Desktop.
Save yanguango/752855 to your computer and use it in GitHub Desktop.
var label = Ti.UI.createLabel({
text: 'Name',
top: 8
});
label.height // return 0 when no width and height setting
var label = Ti.UI.createLabel({
text: 'Blah,Blah,Blah,...',
top: 8,
width: 280,
height: 'auto'
});
label.height
// the height will be changeg base on how long the text is
// so you can get the top of next element by the label.height
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment