How do I remove all of the subviews from a UIScrollview?
In addition to Ricardo de Cillo's, in my case I had a table view that had imageviews in the subviews that I wanted to remove.
for (UIView *v in self.tableview.subviews) {
if ([v isKindOfClass:[UIImageView class]]) {
[v removeFromSuperview];
}
}
The removal of the ! in the if command, and change scrollview
to self.tableview
removed all images, but left the table view untouched.