[self addSubview:button];
        [button mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(spaceWidth + i * buttonWidth);
            make.top.bottom.equalTo(self).offset(0);
            make.width.mas_equalTo(buttonWidth);
            make.height.mas_greaterThanOrEqualTo(40.0);
        }];
        [self layoutIfNeeded];
        CGFloat spacing = 3.0;
        // 图片右移
        CGSize imageSize = button.imageView.frame.size;
        button.titleEdgeInsets = UIEdgeInsetsMake(0.0, - imageSize.width * 2 - spacing, 0.0, 0.0);
        // 文字左移
        CGSize titleSize = button.titleLabel.frame.size;
        button.imageEdgeInsets = UIEdgeInsetsMake(0.0, 0.0, 0.0, - titleSize.width * 2 - spacing);