Hi
Is there a way to remove a view from another view of a specific class?
What I mean I have a view with multiple other views like a scrollview, imageview, tableview and I only want to remove the scrollview.
I thought the code would be something like this:
for (UIView *view in self.view.superview.subviews) {
if ([view.class == [Class UIScrollView]]]) {
[view removeFromSuperview];
}
}
But this didn’t work. I could work with object at index: but because we don’t know what index the scrollview has,so it also won’t work. (I think)
Does someone knows the answer to this problem?
Thank you very much!
Is it this what you mean?