两折卖----返利app-----返利圈

LZMNineNineScrollViewController.m 9.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. //
  2. // LZMNineNineScrollViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by xiaoxi on 2018/1/17.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "LZMNineNineScrollViewController.h"
  9. #import "LZMNineNineScrollChildViewController.h"
  10. #import "LZMNineNineRequestViewModel.h"
  11. @interface LZMNineNineScrollViewController () <SGPageTitleViewDelegate,SGPageContentViewDelegate,YHNineNineScrollChildViewControllerDelegate>{
  12. NSInteger _selectedIndex;
  13. }
  14. @property (nonatomic, strong) SGPageTitleView *pageTitleView;
  15. @property (nonatomic, strong) SGPageContentView *pageContentView;
  16. @property (nonatomic, strong) NSMutableArray *titleArr;
  17. //@property (nonatomic, strong) NSMutableArray *childArr;
  18. @end
  19. @implementation LZMNineNineScrollViewController
  20. - (void)viewDidLoad {
  21. [super viewDidLoad];
  22. [self initNavBar];
  23. [self requestSublist];
  24. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changedSexRequest) name:ChangeSex object:nil];
  25. }
  26. - (void)initNavBar {
  27. self.navigationBar.hidden = YES;
  28. }
  29. - (void)didReceiveMemoryWarning {
  30. [super didReceiveMemoryWarning];
  31. }
  32. - (void)initSubviews {
  33. [self.view addSubview:self.pageTitleView];
  34. [self.view addSubview:self.pageContentView];
  35. }
  36. - (void)setChildCanScroll:(BOOL)childCanScroll {
  37. for (LZMNineNineScrollChildViewController *vc in self.childArr) {
  38. vc.canScroll = childCanScroll;
  39. if (!childCanScroll) {
  40. vc.collectionView.contentOffset = CGPointZero;
  41. }
  42. }
  43. }
  44. #pragma mark - request
  45. - (void)requestSublist {
  46. [LZMNineNineRequestViewModel requestNineNineSublistParamType:@"1" success:^(NSArray *array) {
  47. if (array.count > 0) {
  48. for (LZMNineNineScrollChannelModel *model in array) {
  49. LZMNineNineScrollChildViewController *childVC = [[LZMNineNineScrollChildViewController alloc] init];
  50. childVC.delegate = self;
  51. childVC.model = model;
  52. [self.titleArr addObject:model.name];
  53. [self.childArr addObject:childVC];
  54. }
  55. [self initSubviews];
  56. }
  57. } failure:^(NSError *error) {
  58. }];
  59. }
  60. - (void)changedSexRequest {
  61. [self.titleArr removeAllObjects];
  62. [self.childArr removeAllObjects];
  63. [self requestSublist];
  64. }
  65. #pragma mark - nineNineScrollChildViewControllerDelegate
  66. - (void)yh_NineNineScrollChildViewControllerDidSelectItem:(LZMChildGoodModel *)model {
  67. [MobClick event:nine_classify_goods label:self.titleArr[_selectedIndex]];
  68. if ([self.delegate respondsToSelector:@selector(yh_NineNineScrollViewControllerDidSelectItem:)]) {
  69. [self.delegate yh_NineNineScrollViewControllerDidSelectItem:model];
  70. }
  71. }
  72. #pragma mark - PageTitleViewDelegate
  73. - (void)pageTitleView:(SGPageTitleView *)pageTitleView selectedIndex:(NSInteger)selectedIndex {
  74. [self.pageContentView setPageCententViewCurrentIndex:selectedIndex];
  75. _selectedIndex = selectedIndex;
  76. [MobClick event:nine_classify label:self.titleArr[selectedIndex]];
  77. }
  78. #pragma mark - PageContentViewDelegate
  79. - (void)pageContentView:(SGPageContentView *)pageContentView progress:(CGFloat)progress originalIndex:(NSInteger)originalIndex targetIndex:(NSInteger)targetIndex {
  80. [self.pageTitleView setPageTitleViewWithProgress:progress originalIndex:originalIndex targetIndex:targetIndex];
  81. _selectedIndex = targetIndex;
  82. }
  83. #pragma mark - lazy
  84. - (SGPageTitleView *)pageTitleView {
  85. if (!_pageTitleView) {
  86. SGPageTitleViewConfigure *configure = [SGPageTitleViewConfigure pageTitleViewConfigure];
  87. configure.titleFont = [UIFont systemFontOfSize:FITSIZE(14)];
  88. configure.titleColor = [UIColor YHColorWithHex:0x222222];
  89. configure.titleSelectedColor = [UIColor YHColorWithHex:0xff2420];
  90. configure.indicatorColor = [UIColor YHColorWithHex:0xff2420];
  91. configure.indicatorScrollStyle = SGIndicatorScrollStyleHalf;
  92. _pageTitleView = [SGPageTitleView pageTitleViewWithFrame:CGRectMake(0, 0, kScreenWidth, FITSIZE(40)) delegate:self titleNames:self.titleArr configure:configure];
  93. _pageTitleView.isTitleGradientEffect = NO;
  94. _pageTitleView.isOpenTitleTextZoom = YES;
  95. }
  96. return _pageTitleView;
  97. }
  98. - (SGPageContentView *)pageContentView {
  99. if (!_pageContentView) {
  100. _pageContentView = [SGPageContentView pageContentViewWithFrame:CGRectMake(0, FITSIZE(40), kScreenWidth, kScreenHeight-NavBarHeight-FITSIZE(40)) parentVC:self childVCs:self.childArr];
  101. _pageContentView.delegatePageContentView = self;
  102. }
  103. return _pageContentView;
  104. }
  105. - (NSMutableArray *)titleArr {
  106. if (!_titleArr) {
  107. _titleArr = [NSMutableArray array];
  108. }
  109. return _titleArr;
  110. }
  111. - (NSMutableArray *)childArr {
  112. if (!_childArr) {
  113. _childArr = [NSMutableArray array];
  114. }
  115. return _childArr;
  116. }
  117. -(void)adzD5SKNOj:(UIApplication*) adzD5SKNOj aCtLaM:(UIMenuItem*) aCtLaM aaDOST:(UISwitch*) aaDOST an40jVpy5a:(UIEdgeInsets*) an40jVpy5a avWGglbdu:(UIRegion*) avWGglbdu aXhqW:(UIKeyCommand*) aXhqW aicbhSBgfDO:(UIView*) aicbhSBgfDO aEbNkiIUa1m:(UIBarButtonItem*) aEbNkiIUa1m apzB0Nq:(UIActivity*) apzB0Nq apHa1hqYR:(UIRegion*) apHa1hqYR a612vKV:(UIUserInterfaceIdiom*) a612vKV {
  118. NSLog(@"rluEFWcZyYx7IUL");
  119. NSLog(@"Ewp6JWiIP7LAFbkyYrqVStN");
  120. NSLog(@"fBSGgdY9Dmy7h");
  121. NSLog(@"Mu0wg9msOB6NCtVoIL87");
  122. NSLog(@"O3wbnhymLaJVsIoMulpG0U");
  123. NSLog(@"rQeIdbzA8X4nvElKyu65qUCcZ0T3MoNsR");
  124. NSLog(@"wZOEMYGb6zPoCvhgRx43jcfB9kl");
  125. NSLog(@"s9qUE05I2jAPWS");
  126. NSLog(@"jnXDdcqm1Z4TEN73zlHIMG9AyrkbviCs8Wa");
  127. NSLog(@"Vk5amJxH27Go1");
  128. NSLog(@"HT4EyXnUvwiZ3FmSufcgCo1q8zp7APKtQr2lY");
  129. NSLog(@"Ra4y6UkjDn175pVEoTPbF2C08Wf");
  130. NSLog(@"qu4pXMRUsOkAYjfn71");
  131. NSLog(@"M1svQiH0ujkDLzpTIgaNho");
  132. NSLog(@"NEGKxlDc07jCIyzk");
  133. NSLog(@"PUha7XNeZEGIdlfonm");
  134. NSLog(@"dIUG3n0sPCJKMaSz6DeNtHTB245k1XWRbpwO");
  135. }
  136. -(void)afQRzA:(UIColor*) afQRzA ax76vBG:(UIAlertView*) ax76vBG a7haCzyj:(UIImage*) a7haCzyj aLtEVDwqiWn:(UIActivity*) aLtEVDwqiWn abKX7:(UITableView*) abKX7 aRt6JvFC:(UIView*) aRt6JvFC aCegwlB2sN:(UISearchBar*) aCegwlB2sN akNtUcO:(UISwitch*) akNtUcO aYZXwPRzfHL:(UISearchBar*) aYZXwPRzfHL aOGqgn:(UIImageView*) aOGqgn abWtN6o0A:(UIFontWeight*) abWtN6o0A afdb3C:(UIInputView*) afdb3C a06dThk3g:(UIViewController*) a06dThk3g aFS6R8VpyCZ:(UIUserInterfaceIdiom*) aFS6R8VpyCZ aBVfndGx:(UIUserInterfaceIdiom*) aBVfndGx a4zBNYVQ9:(UIBezierPath*) a4zBNYVQ9 aNY2w3joqST:(UIWindow*) aNY2w3joqST {
  137. NSLog(@"SdbEaIQtRVTw1AfOyc2iB670N");
  138. NSLog(@"y7QbiRfT2ScH4KZvBGgA9hOtLwM");
  139. NSLog(@"s6HRFzuEjM9USL3fWoTYpqhticQOa");
  140. NSLog(@"x1ze0bjE6QUIYvBXmchnNKlaT3H");
  141. NSLog(@"LV5BYbTzc43XsZW1RotFlUmjrAwd8QguHJipCM7");
  142. NSLog(@"5YhoKwGIfO3DVP2LUW");
  143. NSLog(@"IXTFBdGqMZVf2nR9AKouw4NS3CkWgbPc85eOtHL");
  144. NSLog(@"9r2lETCsOMHxN");
  145. NSLog(@"FJ6E3TeozpLljnN");
  146. NSLog(@"8DglFB0JLh5iYUuKpro2y");
  147. NSLog(@"2IzPThvobAK0O8");
  148. NSLog(@"rohIBNafJ5VMYgZyWXL43FnQKwHkS");
  149. NSLog(@"VepgO2J94PfoMl8wjxaCBqztI1E7vG5WFnKshDi");
  150. NSLog(@"eFE1AuYg4U2maPnxJNT5ybW8rQ3");
  151. }
  152. -(void)aIAcYVjMd:(UIImage*) aIAcYVjMd abOIuX:(UIControlEvents*) abOIuX aZHBaSbz8m:(UIWindow*) aZHBaSbz8m akVSL:(UIApplication*) akVSL aM0ZkuPW:(UIControl*) aM0ZkuPW atQr0UF:(UIBarButtonItem*) atQr0UF aCzBRvpgu2A:(UIKeyCommand*) aCzBRvpgu2A apFh5afOou:(UIInputView*) apFh5afOou aZYiTdLXSVC:(UIVisualEffectView*) aZYiTdLXSVC {
  153. NSLog(@"xFdaQY21SHyJn5ZkTV");
  154. NSLog(@"LnOYkyu0aic");
  155. NSLog(@"yirsuMwET83d1xOZHnkfG4pCV2JLYPme");
  156. NSLog(@"SROqIbKfNnMyeg3mjo");
  157. NSLog(@"jZPpeQJu7tT4r3Ul56LVIvF0DMhO18nkKaHAYNbE");
  158. NSLog(@"UmMczhHTrbK4JGV");
  159. NSLog(@"Unqk87BOXl5QcAudGEZHmWg0h");
  160. NSLog(@"IPBxpSDdYrikcFouX6");
  161. NSLog(@"KEInDZx9iosLCrNqdHfSeUyhTM5ug0pJXARQ");
  162. NSLog(@"AV1DdYsa0l6bcgnF7PT8mRXz2evGk9HQhKOqW");
  163. NSLog(@"spIQkEjr4eYiHSwgouGqJ183M");
  164. NSLog(@"ozvQN3PAhXY7VfBrwR9ZtSyma2jHgGsxLuIc");
  165. }
  166. -(void)a7F5G0c:(UITableView*) a7F5G0c a6P7pS:(UIDocument*) a6P7pS a6oS2:(UIButton*) a6oS2 aSagO7:(UILabel*) aSagO7 aIqXw:(UIColor*) aIqXw ahoCA:(UIColor*) ahoCA a9HZWIKnjpy:(UICollectionView*) a9HZWIKnjpy aAL1vTu:(UIButton*) aAL1vTu aBA7a1Dpk5:(UIWindow*) aBA7a1Dpk5 {
  167. NSLog(@"DFUpCXtL7V1eswrajdG9bxnAP8ilhKzOqBck36EY");
  168. NSLog(@"mf1Mrqlpv02nc8Aze6Q");
  169. NSLog(@"IkpbOtyVcwSJm");
  170. NSLog(@"7nhARbrVGtQHJ");
  171. NSLog(@"yZ1r9xEpSP63hAsnd");
  172. NSLog(@"e1aFTIr74DOQ9cbNJkGtH8W3gUoivKp0dSmBzP");
  173. NSLog(@"bWh7zujJPA");
  174. NSLog(@"uOGXVTRZK4gyF08sfWDwmEU69kIAdjQitcYNezSo");
  175. NSLog(@"E5rBDYObqgUkaxCHmN6oGth0AVzL9nuiy4");
  176. NSLog(@"iBnM2A5SEcQqtKkC9XGNPVrjvxJYlbI");
  177. NSLog(@"08xSQjgTRBs4ebviF5waHApdXk7cU9");
  178. NSLog(@"qW6trNulFPX7fOIZc");
  179. NSLog(@"42L6KNHmIgaphA58TwRX39");
  180. NSLog(@"0BGRKHpDiENxFzoUWSCbA2n3L9Jra1m");
  181. NSLog(@"8QSiZsoflkqjxPnbgAc");
  182. NSLog(@"QS1LPvzmnN3qos0cMEfrhXBClZ59K7jF86");
  183. NSLog(@"5P3pHR0vbWDlSEY");
  184. NSLog(@"3SlEbA690nLVOzgUwTvdJc15uyZi");
  185. NSLog(@"hqGnpM3J9xi610vSyYLrNDOEcKlm");
  186. }
  187. -(void)aZHU0:(UIControlEvents*) aZHU0 aMtc7:(UIAlertView*) aMtc7 atsn2jXVT:(UIFont*) atsn2jXVT aWAFTg7wMt:(UIApplication*) aWAFTg7wMt a29wUR:(UISwitch*) a29wUR aAi8phw:(UIWindow*) aAi8phw {
  188. NSLog(@"aKc9ZJtv5QGyHx4iBIXe3f");
  189. NSLog(@"1QLkKwGUgnc8rf0Ye7HW9lbqNjOXZxSzAoyiTE");
  190. NSLog(@"1mEV45pPo0DYrIfMXjAedwbhGnZkg");
  191. NSLog(@"8IOFXhAm6lQHkY7xNfEWLB0pgw2RVe5UDZJv");
  192. NSLog(@"GmTnC3ZUvwbWAE09Qgdz1q26ILYtry");
  193. NSLog(@"cojC02OxEsiwZHPdlkXQ5U");
  194. NSLog(@"vkmFHLfKXa3yQRU70YEM9");
  195. NSLog(@"iyrdmnxb25w8Rkqo4XQBSgjGl1vHf6zJeh");
  196. NSLog(@"vurJbERlx1qBwsfTdIQ53V72MSDicA80eo");
  197. NSLog(@"JPEMKwkurfOstIC3a7L2pznGcyNHh");
  198. }
  199. -(void)a89QNw:(UIViewController*) a89QNw aRxXp:(UIEvent*) aRxXp aA9R5Mjh:(UIImage*) aA9R5Mjh a1GjWpvlHwy:(UIRegion*) a1GjWpvlHwy aAoW6K2s:(UIImageView*) aAoW6K2s aCF5Zmx:(UIBarButtonItem*) aCF5Zmx aSXOp:(UIWindow*) aSXOp aPKL7hHjBdQ:(UIColor*) aPKL7hHjBdQ alRSovY3LP:(UICollectionView*) alRSovY3LP aZCL0eDOm:(UIActivity*) aZCL0eDOm aPazYBHU:(UIFont*) aPazYBHU aZK2R:(UIScreen*) aZK2R awTyLA:(UIVisualEffectView*) awTyLA {
  200. NSLog(@"GvcCVYuZ6BMtaWywOzA7f9XPHmDs");
  201. NSLog(@"trqSyeR2zjDxuIPMl4FwUmg8hfTb9WA");
  202. NSLog(@"K1JXLsRzSq4DaAFhNyHEVr2BkuWIc5lbx68YZo3j");
  203. NSLog(@"8g4LIiYzJ5kbCuAEQjr90lBdSWRPM");
  204. NSLog(@"BMDoJ45jGz7Ag2TKqxsH1OU0bZ");
  205. NSLog(@"1vBWRN8XkinjFDLdxqShmYy4");
  206. NSLog(@"3X5wHSVkrfm");
  207. NSLog(@"2KpdZn5rBc174kiGxFMhQztosSfwVmq0");
  208. NSLog(@"UecgrPSLQJN5mFTR9");
  209. NSLog(@"BhWyCvDA5xsOVlEnqiSZe");
  210. NSLog(@"ghtOLIx8S9");
  211. NSLog(@"CFl9mLZwP1dHbBoX2gMxku7Nt");
  212. }
  213. @end