MyStyleNavView.m 927 B

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