1 // ------获取父视图上面所有的子视图 2 NSArray *array = [self.view subviews]; 3 for (UIView *view in array) { 4 if ([view isKindOfClass:[UILabel class]]) { 5 [view removeFromSuperview]; 6 } 7 }
时间: 2024-10-29 19:12:04
1 // ------获取父视图上面所有的子视图 2 NSArray *array = [self.view subviews]; 3 for (UIView *view in array) { 4 if ([view isKindOfClass:[UILabel class]]) { 5 [view removeFromSuperview]; 6 } 7 }