TrainSummarySubViewController.m 1.0 KB

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