HomeHotMusicView.m 884 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // HomeHotMusicView.m
  3. // KulexiuForStudent
  4. //
  5. // Created by 王智 on 2022/8/29.
  6. //
  7. #import "HomeHotMusicView.h"
  8. @interface HomeHotMusicView ()
  9. @property (nonatomic, copy) HomeMusicActionBlock callback;
  10. @end
  11. @implementation HomeHotMusicView
  12. + (instancetype)shareInstance {
  13. HomeHotMusicView *view = [[[NSBundle mainBundle] loadNibNamed:@"HomeHotMusicView" owner:nil options:nil] firstObject];
  14. return view;
  15. }
  16. - (void)homeMusicMore:(HomeMusicActionBlock)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 304;
  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