Titanium: Remove All Children of View
I picked up this function somewhere a while ago, it’s useful when you want to remove all the children elements of a view in Titanium.
function removeAllChildren(obj) {
var c = obj.children.slice(0);
for (var i = 0; i < c.length; ++i) {
obj.remove(c[i]);
}
}
Found this useful? Everything here is free and stays that way. If it saved you an afternoon, you can buy me a coffee.