I am trying to adda label to a view with no success what am i doing wrong?
var vi = Ti.UI.createView({ backgroundColor : '#fff', }) image.addEventListener('touchend',function(e){ var label = Titanium.UI.createLabel({ color:'#999', text:'I am Window 1', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); vi.add(label); win1.animate({ duration : 500, view : vi, // this is the view to flip into... transition : Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT }); });When I add a button to the view (vi) it works fine just i'm having no joy with the label. All I am trying to achieve is to add some text to the view.
1 Answer
var label = Titanium.UI.createLabel({ top : 10, // set position? left : 10, // set position? color:'#999', text:'I am Window 1', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' });
Your Answer
Think you can help? Login to answer this question!