HomeRecommendMusicView.m 946 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // HomeRecommendMusicView.m
  3. // KulexiuForStudent
  4. //
  5. // Created by 王智 on 2022/10/19.
  6. //
  7. #import "HomeRecommendMusicView.h"
  8. @interface HomeRecommendMusicView ()
  9. @property (nonatomic, strong) HomeRecommendMusicActionBlock callback;
  10. @end
  11. @implementation HomeRecommendMusicView
  12. + (instancetype)shareInstance {
  13. HomeRecommendMusicView *view = [[[NSBundle mainBundle] loadNibNamed:@"HomeRecommendMusicView" owner:nil options:nil] firstObject];
  14. return view;
  15. }
  16. - (void)homeMusicMore:(HomeRecommendMusicActionBlock)callback {
  17. if (callback) {
  18. self.callback = callback;
  19. }
  20. }
  21. - (IBAction)moreMusic:(id)sender {
  22. if (self.callback) {
  23. self.callback();
  24. }
  25. }
  26. + (CGFloat)getViewHeight {
  27. return 364.0f;
  28. }
  29. /*
  30. // Only override drawRect: if you perform custom drawing.
  31. // An empty implementation adversely affects performance during animation.
  32. - (void)drawRect:(CGRect)rect {
  33. // Drawing code
  34. }
  35. */
  36. @end