多个等宽view
NSMutableArray *arr = [NSMutableArray array];
UIButton *btnMore = [UIButton buttonWithType:UIButtonTypeSystem];
[btnMoresetTitle:@"更多" forState:UIControlStateNormal];
[btnMoresetTitleColor:[UIColor colorFromHexRGB:@"333333"] forState:UIControlStateNormal];
[btnMoreaddTarget:self action:@selector(showMask:) forControlEvents:UIControlEventTouchUpInside];
[_footerViewaddSubview:btnMore];
UIButton *btnHold = [UIButton buttonWithType:UIButtonTypeSystem];
[btnHoldsetTitle:@"暂停" forState:UIControlStateNormal];
[btnHoldsetTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
btnHold.backgroundColor = [UIColor redColor];
[_footerViewaddSubview:btnHold];
UIButton *btnOver = [UIButton buttonWithType:UIButtonTypeSystem];
[btnOversetTitle:@"完善需求" forState:UIControlStateNormal];
[btnOversetTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
btnOver.backgroundColor=BaseColor;
[_footerViewaddSubview:btnOver];
[arraddObject:btnMore];
[arraddObject:btnHold];
[arraddObject:btnOver];
[arrmas_distributeViewsAlongAxis:MASAxisTypeHorizontal withFixedSpacing:0 leadSpacing:0 tailSpacing:0];
[arrmakeConstraints:^(MASConstraintMaker*make) {
make.top.equalTo(self->_footerView.top);
make.bottom.equalTo(self->_footerView.bottom);
}];
网友评论