| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // HomeLiveCourseView.m
- // KulexiuForStudent
- //
- // Created by 王智 on 2022/5/26.
- //
- #import "HomeLiveCourseView.h"
- @interface HomeLiveCourseView ()
- @property (nonatomic, copy) HotLiveCourseCallback callback;
- @end
- @implementation HomeLiveCourseView
- + (instancetype)shareInstance {
- HomeLiveCourseView *view = [[[NSBundle mainBundle] loadNibNamed:@"HomeLiveCourseView" owner:nil options:nil] firstObject];
- return view;
- }
- - (void)hotLiveMore:(HotLiveCourseCallback)callback {
- if (callback) {
- self.callback = callback;
- }
- }
- - (IBAction)moreLiveCourse:(id)sender {
- if (self.callback) {
- self.callback();
- }
- }
- - (CGFloat)getViewHeightWithCount:(NSInteger)count {
- return 56 + count * 126;
- }
- /*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect {
- // Drawing code
- }
- */
- @end
|