如果在我的view上有btn,imageview,等等,我只想移出上面的imageview的話
for (UIView *v in self.view.subviews) {
if (1) {
[v removeFromSuperview];
}
}
那一塊我應該怎麼寫
代碼如下:
for (UIView *v in self.view.subviews) {
if ([v isKindOfClass:[UIImageView class]]) {
[v removeFromSuperview];
}
}