//
//  GlobalInputView.m
//  HWMSDKDemo
//
//

#import "GlobalInputView.h"

@implementation GlobalInputView

- (instancetype)init {
    if (self = [super init]) {
        [self createSubviews];
    }
    return self;
}

- (void)createSubviews {
    UILabel *titleLabel = [[UILabel alloc] init];
    [self addSubview:titleLabel];
    titleLabel.font = [UIFont systemFontOfSize:14];
    titleLabel.textColor = HexColor(0x666666);
    titleLabel.numberOfLines = 0;
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.top.bottom.mas_equalTo(self);
        make.width.mas_equalTo(40);
    }];
    self.titleLabel = titleLabel;
    
    UITextField *inputTextField = [[UITextField alloc] init];
    [self addSubview:inputTextField];
    inputTextField.layer.borderColor = HexColor(0x999999).CGColor;
    inputTextField.layer.borderWidth = 0.5;
    inputTextField.layer.cornerRadius = 5;
    inputTextField.font = [UIFont systemFontOfSize:14];
    [inputTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.mas_equalTo(titleLabel.mas_trailing);
        make.trailing.top.bottom.mas_equalTo(self);
    }];
    self.inputTextField = inputTextField;
}

@end

