iphone - How to hide show view titanium? -
hi new titanium.
i have taken 3 view , want hide show view on button click iphone app.
any idea how achieve this?
thanks in advance.
you can hide / show view easily, heres self contained example:
var win = ti.ui.createwindow(); var view = ti.ui.createview({ width : 100, height : 100, backgroundcolor : 'red' }); var redview = ti.ui.createview({ title : 'hide / show red view', bottom : 0, width : 200, height : 35 }); var visible = true; button.addeventlistener('click', function(e) { if(visible) { redview.hide(); } else { redview.show(); } visible = !visible; }); win.add(redview); win.add(button); win.open();
Comments
Post a Comment