ExamArrangeSubViewController.m 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // ExamArrangeSubViewController.m
  3. // LN_School
  4. //
  5. // Created by 张嵘 on 2019/7/29.
  6. // Copyright © 2019 Danson. All rights reserved.
  7. //
  8. #import "ExamArrangeSubViewController.h"
  9. @interface ExamArrangeSubViewController ()
  10. @end
  11. @implementation ExamArrangeSubViewController
  12. #pragma mark - Life Cycle
  13. - (void)viewDidLoad {
  14. [super viewDidLoad];
  15. [self initUI];
  16. }
  17. #pragma mark - Private Fuctions
  18. - (void)initUI {
  19. [self.collectionV hd_setAllDataArr:_subViewControllerSecArr];
  20. /// 点击回调
  21. __weak typeof(self) weakS = self;
  22. [self.collectionV hd_setAllEventCallBack:^(id backModel, HDCallBackType type) {
  23. if (type == HDCellCallBack) {
  24. [weakS clickCell:backModel];
  25. }else if (type == HDSectionHeaderCallBack){
  26. [weakS clickHeader:backModel];
  27. }
  28. }];
  29. self.collectionV.backgroundColor = RQBackGroundColor;
  30. self.collectionV.collectionV.showsVerticalScrollIndicator = NO;
  31. self.collectionV.collectionV.showsHorizontalScrollIndicator = NO;
  32. }
  33. - (void)clickCell:(HDCellModel*)cellM {
  34. NSLog(@"点击了%zd--%zd cell",cellM.indexP.section,cellM.indexP.item);
  35. }
  36. - (void)clickHeader:(HDSectionModel*)secM {
  37. NSLog(@"点击了段头");
  38. }
  39. @end