How to request child views of parent view using Titanium?

I am looking to create a common program that will work on children. As part of the procedure, I should be able to iterate over child views. I don't see anything in the API that would suggest that there is any way to get child views. There is the add () and remove () methods, but nothing is like get (), and there are no properties like views. What am I missing?

+5
source share
2 answers

this is the basic structure for removing children from a view

    if (view.children) {
        for (var c = view.children.length - 1; c >= 0; c--) {
            view.remove(view.children[c]);
        }
    }
+9

if (view.children[c] !== undefined) {..}

.

+4

All Articles