1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //
- // HomeNavView.m
- // KulexiuForTeacher
- //
- // Created by Kyle on 2022/3/28.
- //
- #import "HomeNavView.h"
- @interface HomeNavView ()
- @property (nonatomic, copy) HomeNavCallback callback;
- @end
- @implementation HomeNavView
- + (instancetype)shareInstance {
- HomeNavView *view = [[[NSBundle mainBundle] loadNibNamed:@"HomeNavView" owner:nil options:nil] firstObject];
- return view;
- }
- - (void)displayMessageCenter:(HomeNavCallback)callback {
- if (callback) {
- self.callback = callback;
- }
- }
- - (IBAction)navAction:(id)sender {
- if (self.callback) {
- self.callback(HOMENAV_ACTION_MESSAGE);
- }
- }
- - (IBAction)scanAction:(id)sender {
- if (self.callback) {
- self.callback(HOMENAV_ACTION_SCAN);
- }
- }
- /*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect {
- // Drawing code
- }
- */
- @end
|