RQExerciseToolBarItemViewModel.m 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // RQExerciseToolBarItemViewModel.m
  3. // SDJK
  4. //
  5. // Created by 张嵘 on 2021/8/16.
  6. //
  7. #import "RQExerciseToolBarItemViewModel.h"
  8. @interface RQExerciseToolBarItemViewModel ()
  9. @property (nonatomic, readwrite, strong) RQExerciseModel *exerciseModel;
  10. /// homePageCarType
  11. @property (nonatomic, readwrite, assign) RQHomePageCarType homePageCarType;
  12. /// homePageSubjectType
  13. @property (nonatomic, readwrite, assign) RQHomePageSubjectType homePageSubjectType;
  14. /// readingQuestionsAndAnswerCommand
  15. @property (nonatomic, readwrite, strong) RACCommand *readingQuestionsAndAnswerCommand;
  16. /// skillExplanationCommand
  17. @property (nonatomic, readwrite, strong) RACCommand *skillExplanationCommand;
  18. @end
  19. @implementation RQExerciseToolBarItemViewModel
  20. - (instancetype)initWithRQExerciseModel:(RQExerciseModel *)exerciseModel
  21. homePageCarType:(RQHomePageCarType)homePageCarType
  22. homePageSubject:(RQHomePageSubjectType)homePageSubject
  23. readingQuestionsAndAnswerCommand:(RACCommand *)readingQuestionsAndAnswerCommand
  24. skillExplanationCommand:(RACCommand *)skillExplanationCommand {
  25. if (self = [super init]) {
  26. self.exerciseModel = exerciseModel;
  27. self.homePageCarType = homePageCarType;
  28. self.homePageSubjectType = homePageSubject;
  29. self.readingQuestionsAndAnswerCommand = readingQuestionsAndAnswerCommand;
  30. self.skillExplanationCommand = skillExplanationCommand;
  31. }
  32. return self;
  33. }
  34. - (NSString *)itemClassName {
  35. return @"RQExerciseToolBarCell";
  36. }
  37. @end