[TIMOB-1910] Add a removeAllChildren method to views and windows
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Trivial |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2013-11-11T17:25:30.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.1.0 |
Components | iOS |
Labels | n/a |
Reporter | Ralf Pfeiffer |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:05:21.000+0000 |
Updated | 2017-03-20T22:13:29.000+0000 |
Description
Add the ability to clear all children from a view or a window.
The following is perfectly valid and demonstrates that there is no need for this method:
Of course, this is a fairly extreme case... and the upcoming layout API allowing batching of operations should prevent issues like this.
Separate issue then, but view.remove(other_view) does not always work. Also, this would be incredibly inefficient if you had a lot of views to remove (and the platform provided a similar method to remove all child views).
Stephen's solution won't work (on Android at least), here is Q/A topic regarding this functionality: http://developer.appcelerator.com/question/131151/emptying-a-view Keith, if "remove" does not work, report it. :) And I agree that this functionality would be useful (along many other :D ).
Only commenting to say at least with SDK 3.0+ there is now a removeAllChildren() method. This item appears high on a google search for this problem and it has been marked as won't fix. But actually it has been fixed.
Resolving as duplicate of linked issue.
Closing ticket as duplicate.