Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Get a views subviews?

Is it possible to get the subviews for a given view within Titanium?

I believe the iPhone SDK supports it by [self.view subviews].

— asked September 23rd 2010 by Mike Robinson
  • iphone
  • subview
  • view
0 Comments

2 Answers

  • Accepted Answer

    you can get subviews by using "children", this will return an array consisting of child-objects

    — answered September 23rd 2010 by Christian Sigl
    permalink
    0 Comments
  • Can't for the life of me understand why this is not in the Titanium mobile API documentation. How the heck are people supposed to know this!?

    — answered October 27th 2011 by Cameron Cooke
    permalink
    2 Comments
    • No way. :)

      They (Appcelerator) are aware that their documentation is poor and that it misses a lot of things. They are working to improve documentation, so be patient and ask here in Q/A, many people have encountered similar issues, so they can be very helpful.

      — commented October 27th 2011 by Ivan ┼ákugor
    • children[] doesn't work in 1.8.x
      Does anyone here know of any alternative??

      — commented January 25th 2012 by yogesh maheshwari
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.