0

How do I remove all objects from a UIScrollView (completely clear the scroll view, no matter what is allocated inside):

I tried this but it does not work:

for (UIView *subview in scroll1.subviews) {
    [subview removeFromSuperview];
}
Alessandro
  • 4,000
  • 12
  • 63
  • 131
  • possible duplicate of [how to remove subviews from scrollview?](http://stackoverflow.com/questions/1310723/how-to-remove-subviews-from-scrollview) – Caleb May 14 '12 at 19:44

1 Answers1

2

Have you tried the code posted in the answer to this post ?

Remove all the subviews from a UIScrollView?

Hope this helps

Community
  • 1
  • 1
Titouan de Bailleul
  • 12,920
  • 11
  • 66
  • 121