ExamArrangeViewController.m 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. //
  2. // ExamArrangeViewController.m
  3. // LN_School
  4. //
  5. // Created by 张嵘 on 2019/7/29.
  6. // Copyright © 2019 Danson. All rights reserved.
  7. //
  8. #import "ExamArrangeViewController.h"
  9. #import "ExamArrangeViewModel.h"
  10. @interface ExamArrangeViewController ()
  11. @property (nonatomic, readwrite, strong) ExamArrangeViewModel *examArrangeViewModel;
  12. @end
  13. @implementation ExamArrangeViewController
  14. #pragma mark - Life Cycle
  15. - (void)viewDidLoad {
  16. [super viewDidLoad];
  17. [self initUI];
  18. }
  19. #pragma mark - Private Functions
  20. - (void)initUI {
  21. self.title = @"考试安排";
  22. self.view.backgroundColor = KBackGroundColor;
  23. [self goBackByNavigation];
  24. [self.multipleSc mas_makeConstraints:^(MASConstraintMaker *make) {
  25. make.left.mas_equalTo(self.view.hd_mas_left);
  26. make.right.mas_equalTo(self.view.hd_mas_right);
  27. make.bottom.mas_equalTo(0);
  28. make.top.mas_equalTo(self.view.hd_mas_top);
  29. }];
  30. self.multipleSc.mainCollecitonV.backgroundColor = RQBackGroundColor;
  31. /// 初始化数据
  32. __weak typeof(self) weakS = self;
  33. [self.multipleSc configWithConfiger:^(HDMultipleScrollListConfiger * _Nonnull configer) {
  34. [weakS setWith:configer];
  35. }];
  36. /// 点击回调
  37. [self.multipleSc.mainCollecitonV hd_setAllEventCallBack:^(id backModel, HDCallBackType type) {
  38. if (type == HDCellCallBack) {
  39. [weakS clickCell:backModel];
  40. }else if (type == HDSectionHeaderCallBack){
  41. [weakS clickHeader:backModel];
  42. }
  43. }];
  44. /// 标签个性化设置
  45. [self jxCustomSetting];
  46. }
  47. /// 标签个性化设置
  48. - (void)jxCustomSetting {
  49. self.multipleSc.jxTitle.titleSelectedColor = RQSubColor;
  50. self.multipleSc.jxTitle.titleColorGradientEnabled = YES;
  51. self.multipleSc.jxTitle.titleFont = [UIFont systemFontOfSize:17];
  52. self.multipleSc.jxLineView.indicatorLineViewColor = RQSubColor;
  53. self.multipleSc.jxLineView.lineStyle = JXCategoryIndicatorLineStyle_IQIYI;
  54. self.multipleSc.jxLineView.indicatorWidth = kScreenWidth / 10.0;
  55. self.multipleSc.jxLineView.indicatorHeight = 3;
  56. self.multipleSc.jxLineView.indicatorCornerRadius = 3;
  57. }
  58. /// 初始化数据
  59. - (void)setWith:(HDMultipleScrollListConfiger*)configer {
  60. configer.isHeaderNeedStop = self.examArrangeViewModel.headerStop;
  61. configer.titleContentSize = self.examArrangeViewModel.titleSize;
  62. configer.controllers = self.examArrangeViewModel.controllers;
  63. configer.titles = self.examArrangeViewModel.titles;
  64. configer.diyHeaderClsStr = @"ExamArrangeSearchHeader";
  65. }
  66. - (void)clickCell:(HDCellModel*)cellM {
  67. NSLog(@"点击了%zd--%zd cell",cellM.indexP.section,cellM.indexP.item);
  68. }
  69. - (void)clickHeader:(HDSectionModel*)secM {
  70. NSLog(@"点击了段头");
  71. }
  72. #pragma mark - Lazy Load
  73. - (ExamArrangeViewModel *)examArrangeViewModel {
  74. if (!_examArrangeViewModel) {
  75. _examArrangeViewModel = [[ExamArrangeViewModel alloc] init];
  76. }
  77. return _examArrangeViewModel;
  78. }
  79. @end