// // CoachArrangeClassFooterView.m // LN_School // // Created by 张嵘 on 2019/8/1. // Copyright © 2019 Danson. All rights reserved. // #import "CoachArrangeClassFooterView.h" @interface CoachArrangeClassFooterView () @property (nonatomic, readwrite, strong) UIButton *addBtn; @end @implementation CoachArrangeClassFooterView #pragma mark - Life Cycle - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.backgroundColor = RQBackGroundColor; [self addSubview:self.addBtn]; } return self; } - (void)layoutSubviews { [super layoutSubviews]; [_addBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.center.mas_equalTo(self); make.size.mas_equalTo(CGSizeMake(self.bounds.size.width - 32, self.bounds.size.height - 32)); }]; } #pragma mark - Lazy Load - (UIButton *)addBtn { if (!_addBtn) { _addBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [_addBtn setTitle:@"添加教练排课" forState:UIControlStateNormal]; _addBtn.titleLabel.textAlignment = NSTextAlignmentCenter; _addBtn.titleLabel.textColor = UIColor.whiteColor; _addBtn.backgroundColor = RQPinkBlueColor; _addBtn.titleLabel.numberOfLines = 0; _addBtn.titleLabel.font = [UIFont systemFontOfSize:16]; _addBtn.layer.cornerRadius = 5; _addBtn.layer.masksToBounds = YES; } return _addBtn; } @end