read


Asume that our view name is scrollview
<h3>First way</h3><pre style="background-color: #f0f0f0; border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 646.4666748046875px;"> [[scrollview subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; </pre><h3>Second way</h3><pre style="background-color: #f0f0f0; border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 646.4666748046875px;">NSArray* subviews = scroll.subviews;
for (UIView* view in subviews) {
[view removeFromSuperview];
}
</pre>


Source 1

Source 2

Blog Logo

Daniel Gomez Rico


Published

Image

MakinGIANTS

The findings and tips records of an Android-iOS-TheWholeShabang group

Back to Overview