How to query the child views of a parent view using Titanium?

前端 未结 2 1042
遇见更好的自我
遇见更好的自我 2021-01-18 14:40

I am looking to create a general purpose routine that will operate over a view\'s children. Within the routine I need to be able to iterate over the child views. I don\'t

相关标签:
2条回答
  • 2021-01-18 15:17

    i would check also for

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

    since i already got problems with android without verifieing.

    0 讨论(0)
  • 2021-01-18 15:25

    this is the basic structure for removing child objects from a view

        if (view.children) {
            for (var c = view.children.length - 1; c >= 0; c--) {
                view.remove(view.children[c]);
            }
        }
    
    0 讨论(0)
提交回复
热议问题