(IOS)移除所有的子视图

- (void)removeAllSubviews {

    while (self.subviews.count) {

        UIView* child = self.subviews.lastObject;

        [childremoveFromSuperview];

    }

}

你可能感兴趣的:((IOS)移除所有的子视图)