I created a scrollView & add some item into it.
And them I remove the scrollView by removeSelf()
I create another scrollView (scrollView2) and insert the item again (used in scrollView)
local scrollView = widget.newScrollView({...}) local item = display.newGroup() item.x = ... item.y = ... ... scrollView:insert(item) ... scrollView:removeSelf() -- remove ScrollView -- create another scrollView(scrollView2) & insert the item above local scrollView2 = widget.newScrollView({...}) scrollView2:insert(item)
My questions are:
(1) When I call removeSelf(), do all children be removed?
(2) In the sample code above, it seems ok to use the item (scrollView’s child) even after scrollView is removed, why is that?