HDMultipleScrollListMainVC.m 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // HDMultipleScrollListMainVC.m
  3. // HDCollectionView_Example
  4. //
  5. // Created by HaoDong chen on 2019/5/21.
  6. // Copyright © 2019 donggelaile. All rights reserved.
  7. //
  8. #import "HDMultipleScrollListMainVC.h"
  9. #import "HDMultipleScrollListView.h"
  10. @interface HDMultipleScrollListMainVC ()
  11. @end
  12. @implementation HDMultipleScrollListMainVC
  13. @synthesize multipleSc = _multipleSc;
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. [self setUp];
  17. // Do any additional setup after loading the view.
  18. }
  19. - (void)setUp
  20. {
  21. self.automaticallyAdjustsScrollViewInsets = NO;
  22. _multipleSc = [[HDMultipleScrollListView alloc] initWithFrame:self.view.bounds];
  23. [self.view addSubview:self.multipleSc];
  24. __weak typeof(self) weakSelf = self;
  25. [self.multipleSc configFinishCallback:^(HDMultipleScrollListConfiger * _Nonnull configer) {
  26. [weakSelf configFinish:configer];
  27. }];
  28. }
  29. - (void)configFinish:(HDMultipleScrollListConfiger*)configer
  30. {
  31. [configer.controllers enumerateObjectsUsingBlock:^(UIViewController<HDMultipleScrollListViewScrollViewDidScroll> * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
  32. [self addChildViewController:obj];
  33. }];
  34. }
  35. - (void)dealloc
  36. {
  37. }
  38. /*
  39. #pragma mark - Navigation
  40. // In a storyboard-based application, you will often want to do a little preparation before navigation
  41. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  42. // Get the new view controller using [segue destinationViewController].
  43. // Pass the selected object to the new view controller.
  44. }
  45. */
  46. @end