123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // AccompanyDetailBottomView.m
- // KulexiuForStudent
- //
- // Created by 王智 on 2022/4/20.
- //
- #import "AccompanyDetailBottomView.h"
- @interface AccompanyDetailBottomView ()
- @property (nonatomic, copy) AccompanyButtonAction callback;
- @end
- @implementation AccompanyDetailBottomView
- + (instancetype)shareInstance {
- AccompanyDetailBottomView *view = [[[NSBundle mainBundle] loadNibNamed:@"AccompanyDetailBottomView" owner:nil options:nil] firstObject];
- return view;
- }
- - (void)sureAction:(AccompanyButtonAction)callback {
- if (callback) {
- self.callback = callback;
- }
- }
- - (IBAction)sureSubmitAction:(id)sender {
- if (self.callback) {
- self.callback();
- }
- }
- + (CGFloat)getViewHeight {
- if (IS_iPhoneX) {
- return 44 + 10 + iPhoneXSafeBottomMargin;
- }
- else {
- return 44 + 10 + 20;
- }
- }
- /*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect {
- // Drawing code
- }
- */
- @end
|