一折买app------返利---------返利宝

YZMAFindTopView.m 9.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. //
  2. // YZMAFindTopView.m
  3. // YouHuiProject
  4. //
  5. // Created by xiaoxi on 2018/1/19.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "YZMAFindTopView.h"
  9. #import "YZMACollectionView.h"
  10. #import "YZMAFindTopCollectionViewCell.h"
  11. static NSString *const cellID = @"YZMAFindTopCollectionViewCell";
  12. @interface YZMAFindTopView () <UICollectionViewDelegate,UICollectionViewDataSource>
  13. @property (nonatomic, strong) UICollectionView *collectionView;
  14. @end
  15. @implementation YZMAFindTopView
  16. - (instancetype)initWithFrame:(CGRect)frame {
  17. self = [super initWithFrame:frame];
  18. if (self) {
  19. self.backgroundColor = [UIColor whiteColor];
  20. [self initSubviews];
  21. }
  22. return self;
  23. }
  24. - (void)initSubviews {
  25. UIImageView *iconImageView = [[UIImageView alloc] init];
  26. iconImageView.backgroundColor = [UIColor clearColor];
  27. iconImageView.image = [UIImage imageNamed:@"hot_search"];
  28. [self addSubview:iconImageView];
  29. UILabel *nameLabel = [[UILabel alloc] init];
  30. nameLabel.backgroundColor = [UIColor clearColor];
  31. nameLabel.text = @"正在热搜";
  32. nameLabel.textColor = [UIColor YHColorWithHex:0x222222];
  33. nameLabel.font = [UIFont systemFontOfSize:FITSIZE(12)];
  34. [self addSubview:nameLabel];
  35. [self addSubview:self.collectionView];
  36. [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  37. make.left.equalTo(self).offset(FITSIZE(15));
  38. make.centerY.equalTo(nameLabel);
  39. make.size.mas_equalTo(CGSizeMake(FITSIZE(12), FITSIZE(11)));
  40. }];
  41. [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  42. make.left.equalTo(iconImageView.mas_right).offset(FITSIZE(8));
  43. make.top.equalTo(self).offset(FITSIZE(16));
  44. }];
  45. [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
  46. make.left.equalTo(self);
  47. make.top.equalTo(self).offset(FITSIZE(44));
  48. make.size.mas_equalTo(CGSizeMake(kScreenWidth, FITSIZE(75)));
  49. }];
  50. }
  51. - (void)setDataSource:(NSMutableArray *)dataSource {
  52. _dataSource = dataSource;
  53. [self.collectionView reloadData];
  54. }
  55. #pragma mark - collectionView
  56. - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
  57. return 1;
  58. }
  59. - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
  60. return self.dataSource.count;
  61. }
  62. - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
  63. YZMAFindTopCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellID forIndexPath:indexPath];
  64. YZMAFindHotSearchModel *model = self.dataSource[indexPath.item];
  65. cell.model = model;
  66. return cell;
  67. }
  68. - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
  69. if ([self.delegate respondsToSelector:@selector(yh_FindTopViewDidSelectItemAtIndexPath:)]) {
  70. [self.delegate yh_FindTopViewDidSelectItemAtIndexPath:indexPath];
  71. }
  72. }
  73. #pragma mark - lazy
  74. - (UICollectionView *)collectionView {
  75. if (!_collectionView) {
  76. UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
  77. flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical;
  78. flowLayout.itemSize = CGSizeMake(FITSIZE(108), FITSIZE(75));
  79. flowLayout.minimumLineSpacing = FITSIZE(10);
  80. flowLayout.minimumInteritemSpacing = FITSIZE(10);
  81. flowLayout.sectionInset = UIEdgeInsetsMake(0, FITSIZE(15), 0, FITSIZE(15));
  82. _collectionView = [[YZMACollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:flowLayout];
  83. _collectionView.scrollEnabled = NO;
  84. _collectionView.bounces = NO;
  85. _collectionView.showsVerticalScrollIndicator = NO;
  86. _collectionView.delegate = self;
  87. _collectionView.dataSource = self;
  88. [_collectionView registerClass:[YZMAFindTopCollectionViewCell class] forCellWithReuseIdentifier:cellID];
  89. }
  90. return _collectionView;
  91. }
  92. -(void)aW9XJ3:(UIControl*) aW9XJ3 aGEwxHo:(UIActivity*) aGEwxHo a0dxNGOAMg:(UIEvent*) a0dxNGOAMg ayY0DFKtzH6:(UISwitch*) ayY0DFKtzH6 aCj7J:(UIAlertView*) aCj7J az2jVA5C9q:(UISearchBar*) az2jVA5C9q avtsLO:(UIImage*) avtsLO aaWAFCMNV:(UIKeyCommand*) aaWAFCMNV aoYfMZN:(UIKeyCommand*) aoYfMZN aoUARmH:(UIUserInterfaceIdiom*) aoUARmH aAJy09vD:(UIBarButtonItem*) aAJy09vD at3Yk:(UIEvent*) at3Yk afW7ZHBnck:(UIBezierPath*) afW7ZHBnck aHfjG:(UIFontWeight*) aHfjG abGxA2o:(UIButton*) abGxA2o auMvHa:(UIEvent*) auMvHa aSAxkUGgIBM:(UIRegion*) aSAxkUGgIBM aPceYZgQa:(UIFont*) aPceYZgQa aDUqyXHd:(UIMotionEffect*) aDUqyXHd aRvlJg:(UIInputView*) aRvlJg {
  93. NSLog(@"SyVjkFmUAnM9QzLWi6Zdh1TBYqp4N");
  94. NSLog(@"m5SvQGlB2T");
  95. NSLog(@"7a4kZbj9Ms5PQTcESImn6vUA2x31tYdJwLORHNqW");
  96. NSLog(@"zUGNDhu5IsAktR4KPSiQOb9gcXYZnr10Fx");
  97. NSLog(@"p7YVxmAN9g2UqHPOiysGEwD81f43Iaj");
  98. NSLog(@"d9ERuinpcHADC2kK3UqNYzTPMVbOwyjvWSx");
  99. NSLog(@"szMh8EHUJYd");
  100. NSLog(@"0FxNnI5EObaD6JhsecwUTY7o1XmKpqlv4rVufRP");
  101. NSLog(@"XtbcvfnsKqiJzw");
  102. NSLog(@"lNLZzm8Q1HpXrCb5fA3IUKdPauBe0syjJ");
  103. NSLog(@"ZNVChIxiJ0BOEj4FqG7Qdv3gR8oT6Dfmy");
  104. NSLog(@"Lc1nqdb5SZEwuQa3ztyNF7PD");
  105. NSLog(@"wpsYA3kQTJK8P0i");
  106. NSLog(@"8jvK3S90e7GADkafUlqHsxYhEFyz5nR");
  107. }
  108. -(void)afWatI:(UIUserInterfaceIdiom*) afWatI aGUabMiKW:(UIImage*) aGUabMiKW amuT2JGL:(UIRegion*) amuT2JGL axFVkQrTH9N:(UIView*) axFVkQrTH9N aTRDg:(UIImage*) aTRDg auViwn:(UIFontWeight*) auViwn a2aCtZ:(UIControlEvents*) a2aCtZ aQFnCT0t92:(UIImage*) aQFnCT0t92 aOgtj2aeL6:(UIImageView*) aOgtj2aeL6 a8YEZFeWCA:(UIMotionEffect*) a8YEZFeWCA am1LIu:(UIImage*) am1LIu aBKYt7TM:(UIScreen*) aBKYt7TM aHXS02bd:(UIVisualEffectView*) aHXS02bd ahz6b:(UIButton*) ahz6b {
  109. NSLog(@"wSh97lFAarMd3cN");
  110. NSLog(@"KOD9owJ654TSgfVNjRlMmIqdAUvXEPWhFi");
  111. NSLog(@"li5E0Sb3Ju4V");
  112. NSLog(@"l1q3TMpvybeu4AI");
  113. NSLog(@"qtXFEQUSZTdego1hC5clH");
  114. NSLog(@"BTuG206mLz3SdOvnKq5oltgk9VRf4Yx");
  115. NSLog(@"zBG31TsSgphCP4jAmwD");
  116. NSLog(@"XKjyw9DJcUm2guv5iEY0t7dWRqakzbBFS");
  117. NSLog(@"LnwydPqVNOgj2eU");
  118. NSLog(@"bfqNIiPo8GV");
  119. NSLog(@"ATcSo2n0mJtjB6krR5as7bMCd");
  120. NSLog(@"7cHZjQX3lO0MKi2SUmE4Tx");
  121. NSLog(@"z54WhbQFnalURsj8T7iN0odZPgef9DAH");
  122. NSLog(@"pzNKlGID1QFweWmPaMsSx7uOrkVv0");
  123. NSLog(@"gNZR7dCHtrinLekqP");
  124. NSLog(@"eVboiaqszcER0DW927ONZk3vKHd6PplBI4LhS");
  125. NSLog(@"n9j6HPomsuhZYcWlJ0Kq1vaRDTE34xN");
  126. NSLog(@"jaYtBR8V1L2wKFMDnz");
  127. NSLog(@"ZngAQsPwK2");
  128. }
  129. -(void)aoSFqzh:(UIActivity*) aoSFqzh aQ6iKc7JRsH:(UIFont*) aQ6iKc7JRsH agVeKEvXl:(UIKeyCommand*) agVeKEvXl aYc10:(UISwitch*) aYc10 a7PlZxHqGC:(UIBezierPath*) a7PlZxHqGC apCQz:(UICollectionView*) apCQz aGlnAS:(UIScreen*) aGlnAS arTN8kL0:(UIUserInterfaceIdiom*) arTN8kL0 ahpmBIU:(UITableView*) ahpmBIU aLi2vMF0Al:(UILabel*) aLi2vMF0Al aug2M1H:(UIFontWeight*) aug2M1H a5LaKI7DA1P:(UIKeyCommand*) a5LaKI7DA1P aWgiv3Js:(UIControl*) aWgiv3Js abFZ4Hxp:(UIButton*) abFZ4Hxp amcjNh:(UIAlertView*) amcjNh {
  130. NSLog(@"96qFJAOMGYhzWHQbRTiLIyxB5wp");
  131. NSLog(@"urMRsbVLnZ5mDol6id43QPvWKY");
  132. NSLog(@"El7d0Rqp4jWYmvJ9w5GAIuQNUo6C1ZBSM");
  133. NSLog(@"ArKUb598uNJnlc");
  134. NSLog(@"4iFJZLWz2GbwVSjTgIBvs5cMKUoeqynA");
  135. NSLog(@"xKV2UuafTY7jypGv8eWgIMizdRtbNQXA");
  136. NSLog(@"CbeGDZNJYHLWcV0");
  137. NSLog(@"4J19YzI3EGhlSb50AFPW7nKuNgj6MowpmsqcZ");
  138. NSLog(@"P1bwjt8HsiUC");
  139. NSLog(@"aTGwOeRg3WhB1JjUIp5");
  140. NSLog(@"cpYxagHKyh26MPCi08BUn1XzLsG");
  141. NSLog(@"9yMqVn6Yg2W0AEzIHGpSew");
  142. NSLog(@"4Avr7sh6CG5aMLzWijFkogx2yU9cH1NIJBb");
  143. NSLog(@"Q6GIhuYEboyWMiVfCKrxaNXj8gPDJU7H");
  144. NSLog(@"QDve57pMXqH2rocs6tTLixRIYy0gPhuBANJ4dfZW");
  145. NSLog(@"xLTaBPye5i2rJlOSgUsQ6fou4vq1AKXIh9j8");
  146. }
  147. -(void)a7mh4cL5k:(UIButton*) a7mh4cL5k a79xv:(UIDevice*) a79xv araVL:(UIFontWeight*) araVL abgBEkC:(UIViewController*) abgBEkC aoFSvfPXVz:(UIBarButtonItem*) aoFSvfPXVz aQfY5SXML:(UIEvent*) aQfY5SXML abLwG59X:(UIEvent*) abLwG59X aahuoV3wM5:(UIAlertView*) aahuoV3wM5 a4hec:(UIImageView*) a4hec aOtfgJE:(UIKeyCommand*) aOtfgJE a0RIXZqn97:(UIDocument*) a0RIXZqn97 a8wHJhxj:(UIViewController*) a8wHJhxj asVdj2rSMU:(UIFont*) asVdj2rSMU aUm36rtqpo2:(UIUserInterfaceIdiom*) aUm36rtqpo2 a5BwzfbrG:(UIUserInterfaceIdiom*) a5BwzfbrG abdA58oEsQY:(UICollectionView*) abdA58oEsQY aExZ2HAm:(UITableView*) aExZ2HAm {
  148. NSLog(@"mjeb3ArTwU7QqKiOGRkaM1H065DPC2FsVl");
  149. NSLog(@"x8dt2l0MLKyTESk7ugf5WGNA36");
  150. NSLog(@"C1nVAZ9SLp67wEfYIDmeq30X8JscRiyhk");
  151. NSLog(@"bafEeFjHgBZz4wqyn238YKJNvGtmc5irRTP6");
  152. NSLog(@"Tl0m2nS5wrN7hPfo6BcpYWMCxb1RedIvOazV");
  153. NSLog(@"9sTrwKC8k6MDjhEYZIl14y");
  154. NSLog(@"viEaXjKmDZwxF");
  155. NSLog(@"38T9vgbKnV4Qa");
  156. NSLog(@"Bd5FVGEXsaxNcmZofOWP7uri9CS");
  157. NSLog(@"v1uAFUeVqkx");
  158. NSLog(@"l7Sm4dARTYv6nhbaw");
  159. NSLog(@"RrxeCGLFcksN0OEXQ7wDV1lo");
  160. NSLog(@"ntZcBCTP1jVQFvsK0yo8gAk");
  161. NSLog(@"gXs9RABLbEW2w1");
  162. NSLog(@"k1euXZ8Cs3c7YKGMQ4HflTFwjL6WBVUAyhNvR");
  163. NSLog(@"uHVGPFr2f0637qyNk5vS");
  164. NSLog(@"kShue4r5DiyRpBUvIbVlXL83P");
  165. }
  166. -(void)adflXVSN:(UIWindow*) adflXVSN aC6jLWr:(UIFont*) aC6jLWr aOGHI8:(UIControlEvents*) aOGHI8 avpiR:(UIDocument*) avpiR aQRskKZ:(UIControl*) aQRskKZ a8QqT2:(UIControlEvents*) a8QqT2 amZyftreR7:(UIWindow*) amZyftreR7 aXRQZ:(UIActivity*) aXRQZ aQEhRH:(UIWindow*) aQEhRH aKXcdQ4Dz:(UISwitch*) aKXcdQ4Dz arwEFt:(UICollectionView*) arwEFt aCxFZ46Tj:(UIKeyCommand*) aCxFZ46Tj {
  167. NSLog(@"XO8TUZID1uV3Lqcz0K2k7");
  168. NSLog(@"kH2wTA8dgSyWvuPOVLXGJc4ae0BFizYnr");
  169. NSLog(@"nGfBkboSgp4Cj2r8myd069R7LQ3wWUuhzTM");
  170. NSLog(@"fcSpn15mPt3bqI");
  171. NSLog(@"XH3OvDWVYS");
  172. NSLog(@"L5rkny3OxJi2BMefKgb1tCPsd6");
  173. NSLog(@"oIOxc5C2r6PvqEhl4dHwMebyjiXaBQD");
  174. NSLog(@"CTUMRHl6Ih");
  175. NSLog(@"UXfNSLx3q0rnIG");
  176. NSLog(@"qVfSCIdGlz6PL3FM7vxors");
  177. NSLog(@"t1bD052MfBxTuWS9qpdGei7Ko4IaYNk8mAnsw");
  178. NSLog(@"HSoYBz36DgQqa");
  179. NSLog(@"tTBh4cVF8GlwqnWDzdJYE60N1MI");
  180. NSLog(@"emLgAYQXCkG3tEWNqR9xypPBD2jiToJHducr");
  181. NSLog(@"QEeyv1cZH30uJzV");
  182. NSLog(@"6FWxncpvzgaG01rdjAh7UsbJZ8");
  183. NSLog(@"VwihuPr9oIKj0F31Eafmy");
  184. NSLog(@"NoegSR6u4U70VJlKZnjBFr8p");
  185. NSLog(@"JByZvTiLHICmpX2E5zKbFYr1d8eas3lNc0PtR");
  186. NSLog(@"dFSXVcvr5i");
  187. }
  188. @end