[self.bgView addSubview:self.progressImageView]; [self.progressImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.nameLabel.mas_right).with.offset(10); make.centerY.mas_equalTo(self.iconImageView); make.width.mas_equalTo(self.progressBgView).multipliedBy(1); make.height.mas_equalTo(3); }];
使用 multipliedBy 設置一個控件的寬是另外一個寬的倍數spa