// // AboutUsBodyView.m // KulexiuForTeacher // // Created by Kyle on 2022/3/22. // #import "AboutUsBodyView.h" @interface AboutUsBodyView () @property (weak, nonatomic) IBOutlet UILabel *versionLabel; @property (weak, nonatomic) IBOutlet UILabel *phoneLabel; @property (weak, nonatomic) IBOutlet UILabel *emailLabel; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomSpace; @property (nonatomic, copy) DisplayCheckLinkCallback callback; @end @implementation AboutUsBodyView - (void)awakeFromNib { [super awakeFromNib]; self.versionLabel.text = [NSString stringWithFormat:@"版本号%@",[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]]; self.phoneLabel.text = @"15347100733"; self.emailLabel.text = @"klx@kulexiu999.onexmail.com"; self.bottomSpace.constant = 6 + iPhoneXSafeBottomMargin; } - (void)configPhone:(NSString *)phone email:(NSString *)email { self.phoneLabel.text = [NSString returnNoNullStringWithString:phone]; self.emailLabel.text = [NSString returnNoNullStringWithString:email]; } + (instancetype)shareInstance { AboutUsBodyView *view = [[[NSBundle mainBundle] loadNibNamed:@"AboutUsBodyView" owner:nil options:nil] firstObject]; return view; } - (void)showCheckLink:(DisplayCheckLinkCallback)callback { if (callback) { self.callback = callback; } } - (IBAction)openWebView:(id)sender { if (self.callback) { self.callback(); } } /* // Only override drawRect: if you perform custom drawing. // An empty implementation adversely affects performance during animation. - (void)drawRect:(CGRect)rect { // Drawing code } */ @end