Skip to content

Instantly share code, notes, and snippets.

View vaudevillejay's full-sized avatar

vaudevillejay

View GitHub Profile
@iskugor
iskugor / app.js
Created February 9, 2012 13:02
Remove all child elements in Titanium
function removeAllChildren(viewObject){
//copy array of child object references because view's "children" property is live collection of child object references
var children = viewObject.children.slice(0);
for (var i = 0; i < children.length; ++i) {
viewObject.remove(children[i]);
}
}
//Create a container view
var container = Ti.UI.createView({
width:200,
height:200,
top:10,
left:10
});
//Create a drop shadow view
var shadow = Ti.UI.createView({