- (void)removeDynamictItemView:(UIView *)view
{
NSMutableArray *itemesToRemove = [NSMutableArray array];
for (UIView *subview in view.subviews) {
if ([subview isKindOfClass:[TBCouponDynamictItemView class]]) {
[itemesToRemove addObject:subview];
}else{
[self removeDynamictItemView:subview];
}
}
[itemesToRemove makeObjectsPerformSelector:@selector(removeFromSuperview)];
}
uiview 删除某个指定view类的代码块,布布扣,bubuko.com
原文地址:http://blog.csdn.net/hufengvip/article/details/36382367