Titanium Community Questions & Answer Archive

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

Any way to remove all child views from a view?

I have a scroll view that I populate with a grid of image views, however, I need a way to remove all of those image views at once. Anyone know how?

— asked June 4th 2010 by Bill Labus
  • all
  • clear
  • remove
  • view

2 Answers

  • I use a view container to hold the scrollview obj and to remove it, i would call the remove method like viewcontainer.remove(scrollview)

    — answered June 4th 2010 by Daniel Lim
  • I would use fireEvent on the mainview and listeners on image views…

    — answered June 6th 2010 by michel perrin
    1 Comment
    • Could you elaborate on how that would be done? I basically just need to remove them at a time of my choosing, not from any type of event.

      — commented June 6th 2010 by Bill Labus
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.