Xib设置多个view颜色等属性快速方法

- (void)setColorWithSuperview:(UIView *)view {
    for (int i = 10; i< 20; i++) {
        UILabel *aLab = [view viewWithTag:i];
        aLab.textColor = kWordBlackColor;
    }
    for (int i = 20; i< 30; i++) {
        UILabel *aLab = [view viewWithTag:i];
        aLab.textColor = kWordRedColor;
    }
    UIView *lineView = [view viewWithTag:31];
    lineView.backgroundColor = kBackLineColor;
}

可以通过设置tag来快速设置。

你可能感兴趣的:(Xib设置多个view颜色等属性快速方法)