// // YOUPAIPickerViewHeader.m // MSYOUPAI // // Created by admin on 2022/3/4. // Copyright © 2022 MS. All rights reserved. // #import "YOUPAIPickerViewHeader.h" @implementation YOUPAIPickerViewHeader -(UIView *)youpaiplineView{ if(_youpaiplineView == nil){ _youpaiplineView = [UIView new]; _youpaiplineView.backgroundColor = LZF5F4F7Color; } return _youpaiplineView; } -(UIButton *)youpaipCancleBtn{ if(_youpaipCancleBtn == nil){ _youpaipCancleBtn = [UIButton new]; _youpaipCancleBtn.titleLabel.font = LCFont15; [_youpaipCancleBtn setTitle:@"取消" forState:UIControlStateNormal]; [_youpaipCancleBtn setTitleColor:LZA3AABEColor forState:UIControlStateNormal]; } return _youpaipCancleBtn; } -(UIButton *)youpaipCommitBtn{ if(_youpaipCommitBtn == nil){ _youpaipCommitBtn = [UIButton new]; _youpaipCommitBtn.titleLabel.font = LCFont15; [_youpaipCommitBtn setTitle:@"确认" forState:UIControlStateNormal]; [_youpaipCommitBtn setTitleColor:LZ273145Color forState:UIControlStateNormal]; } return _youpaipCommitBtn; } -(instancetype)initWithFrame:(CGRect)frame{ if (self == [super initWithFrame:frame]){ [self addSubview:self.youpaipCancleBtn]; [self addSubview:self.youpaipCommitBtn]; [self addSubview:self.youpaiplineView]; [self youpaifmakeLayout]; } return self; } -(void)youpaifmakeLayout{ [_youpaipCancleBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(44); make.centerY.mas_equalTo(0); // make.size.mas_offset(32); }]; [_youpaipCommitBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(-44); make.centerY.mas_equalTo(0); // make.size.mas_offset(32); }]; [_youpaiplineView mas_makeConstraints:^(MASConstraintMaker *make) { make.bottom.mas_equalTo(0); make.left.mas_equalTo(12); make.right.mas_equalTo(-12); make.height.mas_equalTo(0.5); }]; } @end