1 // ------获取父视图上面所有的子视图2 NSArray *array = [self.view subviews]; 3 for (UIView *view in array) { 4 if ([view isKindOfClass:[UILabel class]]) { 5 [view removeFromSuperview];6 }7 }
本文共 282 字,大约阅读时间需要 1 分钟。
1 // ------获取父视图上面所有的子视图2 NSArray *array = [self.view subviews]; 3 for (UIView *view in array) { 4 if ([view isKindOfClass:[UILabel class]]) { 5 [view removeFromSuperview];6 }7 }
转载于:https://www.cnblogs.com/fengmin/p/5541316.html