1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- //
- // PreExamMarkHeaderView.m
- // LN_School
- //
- // Created by 张嵘 on 2019/7/31.
- // Copyright © 2019 Danson. All rights reserved.
- //
- #import "PreExamMarkHeaderView.h"
- #import "RQSearchView.h"
- @interface PreExamMarkHeaderView ()
- @property (nonatomic, readwrite, strong) RQSearchView *searchView;
- @end
- @implementation PreExamMarkHeaderView
- #pragma mark - Life Cycle
- - (instancetype)initWithFrame:(CGRect)frame {
- self = [super initWithFrame:frame];
- if (self) {
- [self addSubview:self.searchView];
- }
- __weak typeof (self) weakS = self;
- [self addTapActionWithBlock:^(UIGestureRecognizer *gestureRecoginzer) {
- [weakS clickSelf];
- }];
- return self;
- }
- - (void)layoutSubviews {
- [super layoutSubviews];
-
- [_searchView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.center.mas_equalTo(self);
- make.size.mas_equalTo(CGSizeMake(self.bounds.size.width - 32, self.bounds.size.height - 32));
- _searchView.layer.cornerRadius = (self.bounds.size.height - 32) / 2.0;
- _searchView.layer.masksToBounds = YES;
-
- }];
- }
- #pragma mark - Private Functions
- - (void)updateSecVUI:(__kindof HDSectionModel *)model {
-
- }
- - (void)clickSelf {
- self.callback(self.hdSecModel);
- }
- #pragma mark - LazyLoad
- - (RQSearchView *)searchView {
- if (!_searchView) {
- _searchView = [[RQSearchView alloc] init];
- }
- return _searchView;
- }
- @end
|