123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- //
- // YZMAFindTopView.m
- // YouHuiProject
- //
- // Created by xiaoxi on 2018/1/19.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "YZMAFindTopView.h"
- #import "YZMACollectionView.h"
- #import "YZMAFindTopCollectionViewCell.h"
- static NSString *const cellID = @"YZMAFindTopCollectionViewCell";
- @interface YZMAFindTopView () <UICollectionViewDelegate,UICollectionViewDataSource>
- @property (nonatomic, strong) UICollectionView *collectionView;
- @end
- @implementation YZMAFindTopView
- - (instancetype)initWithFrame:(CGRect)frame {
- self = [super initWithFrame:frame];
- if (self) {
- self.backgroundColor = [UIColor whiteColor];
-
- [self initSubviews];
- }
- return self;
- }
- - (void)initSubviews {
- UIImageView *iconImageView = [[UIImageView alloc] init];
- iconImageView.backgroundColor = [UIColor clearColor];
- iconImageView.image = [UIImage imageNamed:@"hot_search"];
- [self addSubview:iconImageView];
-
- UILabel *nameLabel = [[UILabel alloc] init];
- nameLabel.backgroundColor = [UIColor clearColor];
- nameLabel.text = @"正在热搜";
- nameLabel.textColor = [UIColor YHColorWithHex:0x222222];
- nameLabel.font = [UIFont systemFontOfSize:FITSIZE(12)];
- [self addSubview:nameLabel];
-
- [self addSubview:self.collectionView];
-
- [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self).offset(FITSIZE(15));
- make.centerY.equalTo(nameLabel);
- make.size.mas_equalTo(CGSizeMake(FITSIZE(12), FITSIZE(11)));
- }];
-
- [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(iconImageView.mas_right).offset(FITSIZE(8));
- make.top.equalTo(self).offset(FITSIZE(16));
- }];
-
- [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self);
- make.top.equalTo(self).offset(FITSIZE(44));
- make.size.mas_equalTo(CGSizeMake(kScreenWidth, FITSIZE(75)));
- }];
- }
- - (void)setDataSource:(NSMutableArray *)dataSource {
- _dataSource = dataSource;
- [self.collectionView reloadData];
- }
- #pragma mark - collectionView
- - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
- return 1;
- }
- - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
- return self.dataSource.count;
- }
- - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
- YZMAFindTopCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellID forIndexPath:indexPath];
- YZMAFindHotSearchModel *model = self.dataSource[indexPath.item];
- cell.model = model;
- return cell;
- }
- - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
- if ([self.delegate respondsToSelector:@selector(yh_FindTopViewDidSelectItemAtIndexPath:)]) {
- [self.delegate yh_FindTopViewDidSelectItemAtIndexPath:indexPath];
- }
- }
- #pragma mark - lazy
- - (UICollectionView *)collectionView {
- if (!_collectionView) {
- UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
- flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical;
- flowLayout.itemSize = CGSizeMake(FITSIZE(108), FITSIZE(75));
- flowLayout.minimumLineSpacing = FITSIZE(10);
- flowLayout.minimumInteritemSpacing = FITSIZE(10);
- flowLayout.sectionInset = UIEdgeInsetsMake(0, FITSIZE(15), 0, FITSIZE(15));
-
- _collectionView = [[YZMACollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:flowLayout];
- _collectionView.scrollEnabled = NO;
- _collectionView.bounces = NO;
- _collectionView.showsVerticalScrollIndicator = NO;
- _collectionView.delegate = self;
- _collectionView.dataSource = self;
- [_collectionView registerClass:[YZMAFindTopCollectionViewCell class] forCellWithReuseIdentifier:cellID];
- }
- return _collectionView;
- }
- -(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 {
- NSLog(@"SyVjkFmUAnM9QzLWi6Zdh1TBYqp4N");
- NSLog(@"m5SvQGlB2T");
- NSLog(@"7a4kZbj9Ms5PQTcESImn6vUA2x31tYdJwLORHNqW");
- NSLog(@"zUGNDhu5IsAktR4KPSiQOb9gcXYZnr10Fx");
- NSLog(@"p7YVxmAN9g2UqHPOiysGEwD81f43Iaj");
- NSLog(@"d9ERuinpcHADC2kK3UqNYzTPMVbOwyjvWSx");
- NSLog(@"szMh8EHUJYd");
- NSLog(@"0FxNnI5EObaD6JhsecwUTY7o1XmKpqlv4rVufRP");
- NSLog(@"XtbcvfnsKqiJzw");
- NSLog(@"lNLZzm8Q1HpXrCb5fA3IUKdPauBe0syjJ");
- NSLog(@"ZNVChIxiJ0BOEj4FqG7Qdv3gR8oT6Dfmy");
- NSLog(@"Lc1nqdb5SZEwuQa3ztyNF7PD");
- NSLog(@"wpsYA3kQTJK8P0i");
- NSLog(@"8jvK3S90e7GADkafUlqHsxYhEFyz5nR");
- }
- -(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 {
- NSLog(@"wSh97lFAarMd3cN");
- NSLog(@"KOD9owJ654TSgfVNjRlMmIqdAUvXEPWhFi");
- NSLog(@"li5E0Sb3Ju4V");
- NSLog(@"l1q3TMpvybeu4AI");
- NSLog(@"qtXFEQUSZTdego1hC5clH");
- NSLog(@"BTuG206mLz3SdOvnKq5oltgk9VRf4Yx");
- NSLog(@"zBG31TsSgphCP4jAmwD");
- NSLog(@"XKjyw9DJcUm2guv5iEY0t7dWRqakzbBFS");
- NSLog(@"LnwydPqVNOgj2eU");
- NSLog(@"bfqNIiPo8GV");
- NSLog(@"ATcSo2n0mJtjB6krR5as7bMCd");
- NSLog(@"7cHZjQX3lO0MKi2SUmE4Tx");
- NSLog(@"z54WhbQFnalURsj8T7iN0odZPgef9DAH");
- NSLog(@"pzNKlGID1QFweWmPaMsSx7uOrkVv0");
- NSLog(@"gNZR7dCHtrinLekqP");
- NSLog(@"eVboiaqszcER0DW927ONZk3vKHd6PplBI4LhS");
- NSLog(@"n9j6HPomsuhZYcWlJ0Kq1vaRDTE34xN");
- NSLog(@"jaYtBR8V1L2wKFMDnz");
- NSLog(@"ZngAQsPwK2");
- }
- -(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 {
- NSLog(@"96qFJAOMGYhzWHQbRTiLIyxB5wp");
- NSLog(@"urMRsbVLnZ5mDol6id43QPvWKY");
- NSLog(@"El7d0Rqp4jWYmvJ9w5GAIuQNUo6C1ZBSM");
- NSLog(@"ArKUb598uNJnlc");
- NSLog(@"4iFJZLWz2GbwVSjTgIBvs5cMKUoeqynA");
- NSLog(@"xKV2UuafTY7jypGv8eWgIMizdRtbNQXA");
- NSLog(@"CbeGDZNJYHLWcV0");
- NSLog(@"4J19YzI3EGhlSb50AFPW7nKuNgj6MowpmsqcZ");
- NSLog(@"P1bwjt8HsiUC");
- NSLog(@"aTGwOeRg3WhB1JjUIp5");
- NSLog(@"cpYxagHKyh26MPCi08BUn1XzLsG");
- NSLog(@"9yMqVn6Yg2W0AEzIHGpSew");
- NSLog(@"4Avr7sh6CG5aMLzWijFkogx2yU9cH1NIJBb");
- NSLog(@"Q6GIhuYEboyWMiVfCKrxaNXj8gPDJU7H");
- NSLog(@"QDve57pMXqH2rocs6tTLixRIYy0gPhuBANJ4dfZW");
- NSLog(@"xLTaBPye5i2rJlOSgUsQ6fou4vq1AKXIh9j8");
- }
- -(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 {
- NSLog(@"mjeb3ArTwU7QqKiOGRkaM1H065DPC2FsVl");
- NSLog(@"x8dt2l0MLKyTESk7ugf5WGNA36");
- NSLog(@"C1nVAZ9SLp67wEfYIDmeq30X8JscRiyhk");
- NSLog(@"bafEeFjHgBZz4wqyn238YKJNvGtmc5irRTP6");
- NSLog(@"Tl0m2nS5wrN7hPfo6BcpYWMCxb1RedIvOazV");
- NSLog(@"9sTrwKC8k6MDjhEYZIl14y");
- NSLog(@"viEaXjKmDZwxF");
- NSLog(@"38T9vgbKnV4Qa");
- NSLog(@"Bd5FVGEXsaxNcmZofOWP7uri9CS");
- NSLog(@"v1uAFUeVqkx");
- NSLog(@"l7Sm4dARTYv6nhbaw");
- NSLog(@"RrxeCGLFcksN0OEXQ7wDV1lo");
- NSLog(@"ntZcBCTP1jVQFvsK0yo8gAk");
- NSLog(@"gXs9RABLbEW2w1");
- NSLog(@"k1euXZ8Cs3c7YKGMQ4HflTFwjL6WBVUAyhNvR");
- NSLog(@"uHVGPFr2f0637qyNk5vS");
- NSLog(@"kShue4r5DiyRpBUvIbVlXL83P");
- }
- -(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 {
- NSLog(@"XO8TUZID1uV3Lqcz0K2k7");
- NSLog(@"kH2wTA8dgSyWvuPOVLXGJc4ae0BFizYnr");
- NSLog(@"nGfBkboSgp4Cj2r8myd069R7LQ3wWUuhzTM");
- NSLog(@"fcSpn15mPt3bqI");
- NSLog(@"XH3OvDWVYS");
- NSLog(@"L5rkny3OxJi2BMefKgb1tCPsd6");
- NSLog(@"oIOxc5C2r6PvqEhl4dHwMebyjiXaBQD");
- NSLog(@"CTUMRHl6Ih");
- NSLog(@"UXfNSLx3q0rnIG");
- NSLog(@"qVfSCIdGlz6PL3FM7vxors");
- NSLog(@"t1bD052MfBxTuWS9qpdGei7Ko4IaYNk8mAnsw");
- NSLog(@"HSoYBz36DgQqa");
- NSLog(@"tTBh4cVF8GlwqnWDzdJYE60N1MI");
- NSLog(@"emLgAYQXCkG3tEWNqR9xypPBD2jiToJHducr");
- NSLog(@"QEeyv1cZH30uJzV");
- NSLog(@"6FWxncpvzgaG01rdjAh7UsbJZ8");
- NSLog(@"VwihuPr9oIKj0F31Eafmy");
- NSLog(@"NoegSR6u4U70VJlKZnjBFr8p");
- NSLog(@"JByZvTiLHICmpX2E5zKbFYr1d8eas3lNc0PtR");
- NSLog(@"dFSXVcvr5i");
- }
- @end
|