// // LZMModuleView.m // YouHuiProject // // Created by 小花 on 2018/7/4. // Copyright © 2018年 kuxuan. All rights reserved. // #import "LZMModuleView.h" #import "LZMModuleCollectionCell.h" static NSString *ldModuleCollectionCell = @"ldModuleCollectionCell"; @interface LZMModuleView(){ NSArray *_dataArr; } @property (nonatomic, strong) UICollectionView *collectionView; @end @implementation LZMModuleView - (void)setRecommonData:(NSArray *)dataArr { _dataArr = dataArr.mutableCopy; [self.collectionView reloadData]; } - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.layer.masksToBounds = YES; [self initSubView]; } return self; } - (void)initSubView { UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc]init]; self.collectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0, 0, self.width, self.height) collectionViewLayout:flowLayout]; flowLayout.minimumLineSpacing = 5; flowLayout.minimumInteritemSpacing = 10; flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal; self.collectionView.backgroundColor = [UIColor whiteColor]; [self.collectionView registerClass:[LZMModuleCollectionCell class] forCellWithReuseIdentifier:ldModuleCollectionCell]; self.collectionView.delegate = self; self.collectionView.dataSource = self; self.collectionView.showsHorizontalScrollIndicator = NO; [self addSubview:self.collectionView]; } #pragma mark ---- UICollectionView Delegate ------ -(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { return CGSizeMake((SCREEN_WIDTH-30)/3, self.collectionView.height); } - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { return 1; } - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { return _dataArr.count; } - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section { return CGSizeMake(0, 0); } - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section { return CGSizeMake(0, 0); } - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { LZMChildGoodModel *model = _dataArr[indexPath.row]; LZMModuleCollectionCell *cell = [self.collectionView dequeueReusableCellWithReuseIdentifier:ldModuleCollectionCell forIndexPath:indexPath]; cell.model = model; return cell; } - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section { return UIEdgeInsetsMake(0, 10, 0, 0); } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { LZMChildGoodModel *model = _dataArr[indexPath.row]; if (self.didSelectedGood) { self.didSelectedGood(model); } } -(void)a1NK4mXiYya:(UIVisualEffectView*) a1NK4mXiYya aNHagI:(UIImageView*) aNHagI aupglcAQeN:(UILabel*) aupglcAQeN abXj93KWG:(UIEvent*) abXj93KWG agTLr:(UIColor*) agTLr abGTYSZ:(UIMotionEffect*) abGTYSZ acCK5O:(UIFont*) acCK5O agKpo9xwd:(UIRegion*) agKpo9xwd a2T0W:(UITableView*) a2T0W aZsBx:(UIView*) aZsBx anfUWsz:(UIApplication*) anfUWsz { NSLog(@"wbPgx3cT5sJ0KY6utA9o4hpVman7vX"); NSLog(@"1OPaXC9E3tIA4e82bshWBjUZ5kVRFix0Mwz7Qmv"); NSLog(@"X3at8OyPUekLDGJrsmQocf7VYpb0lj"); NSLog(@"514ombFABDTv"); NSLog(@"frDRLZ4E6SO"); NSLog(@"itILpAzauEDm5"); NSLog(@"1btwEUDgQVydmXi9N8uk"); NSLog(@"CT5VvgKR7PLS4zlwZ"); NSLog(@"bihuDkzrcj8FnOSHUfwWQZRY6esgEJP7NxVv2C"); NSLog(@"9qskOm7rDMXUJBf26dYPCuKplF8GgSITW3"); NSLog(@"W5Lz6wENn0gQfmKIaxlF37RiT"); } -(void)ahIgZUY:(UIVisualEffectView*) ahIgZUY a05Volq9OH:(UIViewController*) a05Volq9OH aJLVP2C:(UIInputView*) aJLVP2C afl4NTq7:(UIVisualEffectView*) afl4NTq7 asWmLr6kb5C:(UIInputView*) asWmLr6kb5C aAVr9LfhQu:(UIButton*) aAVr9LfhQu aAIhJ:(UIWindow*) aAIhJ a9N6gHnF:(UIEdgeInsets*) a9N6gHnF { NSLog(@"6cQKI1hlBbwX5zHrU0u9SCfaPvOM3Ng"); NSLog(@"RrK74UmgAOipSdvyLV"); NSLog(@"dVBSyc4lMa6jHUt1nvXowxfChZ5rJP7iFNkeu"); NSLog(@"9lnjCa2FREDQcG0IbiB3vxsVy"); NSLog(@"AhHBPEQU5l13rVftuxI0JWqked2LMTyvCzsR"); NSLog(@"vjKYdDmfsR"); NSLog(@"RW7YIudesgwzoiyHNr1a52G"); NSLog(@"UQpOtmdjX0af7nLAMHr483RPBY6"); NSLog(@"r0cFPAUTYJnqya2z7Hv"); NSLog(@"eGLOYjC53XWbAZVadEpsrmNoxBMSK"); NSLog(@"0fbBcN9q78JI2zvjP"); NSLog(@"KHlxAY3fIpFdQjGs2SD1rNuCEckW5JO"); NSLog(@"Lzkp5ZgOTs3a0BIXV8jhybK2HC7wrA4GqE"); NSLog(@"XtpC6Lb7h3dKrV0PzHa9ufEYFBqi5mATn2"); NSLog(@"CEeDjYSrdZhaG24z7Fpv9"); NSLog(@"gyTKD4W1ZLSBJjrQl"); } -(void)aNHaz:(UIUserInterfaceIdiom*) aNHaz aTPIv0OWft:(UIBezierPath*) aTPIv0OWft a37TKnQhegU:(UIInputView*) a37TKnQhegU aGAZPyv86s:(UIViewController*) aGAZPyv86s ak83mMZ6Qw:(UIControlEvents*) ak83mMZ6Qw { NSLog(@"Tq7Gvz6j3IEmdV"); NSLog(@"jvi7VWf0XEh9StRIqkm2HZwb6DKl5upJ"); NSLog(@"AFZiRqwxM8hlSmpJBs0cXQatkeyDU6jWzHnLgdV9"); NSLog(@"sN0I7yG9DnT1fJ5AvZXj"); NSLog(@"U45nuKoIQtiXH7WAjvMTZEs"); NSLog(@"N0hCy3H4ZaoijpAbu6n1vJc92RtVXlzWD"); NSLog(@"7iqxAp2ftXLCE9oSlghzrQ"); NSLog(@"fpOv6lSoKJVy0a27c5QPZMwjNr9k"); NSLog(@"qx6SG1bkFVpd4ljhEPvKiTQO0Wfz2cgmaH5s9"); NSLog(@"OoNb2dABsFtYuXmKQJTe6iRZEchCMj"); NSLog(@"yoEvcxS8Azwp1ZmQYXigFHBIN527uMWG0ODj"); NSLog(@"9aoSiEWRcebMYGBKznuNtgIJDf51"); NSLog(@"lqxYjvI67oZ1B9g0PUtkwQScizfVG"); NSLog(@"PQIecD1rEmdWfu3GL"); NSLog(@"GxVlwi6BLIqQKZtu"); NSLog(@"LzaqZJ4rENy"); } -(void)aaQGiLHMx:(UIFontWeight*) aaQGiLHMx aQ9XP:(UIFont*) aQ9XP aNbi0:(UIInputView*) aNbi0 aMpeZUQX:(UIFontWeight*) aMpeZUQX a3Bh9qe:(UIWindow*) a3Bh9qe a1ki6UyHgq3:(UIWindow*) a1ki6UyHgq3 aAjfsSoUlHy:(UIBezierPath*) aAjfsSoUlHy aL7vnH:(UIImage*) aL7vnH auLgyiKW5V:(UIColor*) auLgyiKW5V aIoh8ZKzOp:(UIVisualEffectView*) aIoh8ZKzOp amhF68L2:(UICollectionView*) amhF68L2 a7j54:(UIBarButtonItem*) a7j54 a0OLMm:(UIVisualEffectView*) a0OLMm avjnx:(UIScreen*) avjnx aZ39OyLgn:(UITableView*) aZ39OyLgn ayA9l:(UIBarButtonItem*) ayA9l aMH5y8zP3:(UIBarButtonItem*) aMH5y8zP3 abS9f1VrtZ7:(UIVisualEffectView*) abS9f1VrtZ7 aS8PDbMWqV:(UIView*) aS8PDbMWqV { NSLog(@"qyQXtngvd095z42HELRNUr"); NSLog(@"aDFnXL83PI6UTgsHQJtc9mGq5lo2OYZ0"); NSLog(@"9XSvQCyuBItNj"); NSLog(@"9xWLHETiXSGCqUd8hoYbs"); NSLog(@"EKMkiFLDvjWqmxfhz5oG8w27nUeraJNbdP4c"); NSLog(@"hXAvwRmcOeduFsgZ"); NSLog(@"LjvWqHMOozZwislt4x8hgyAbdKJT"); NSLog(@"W5D2gsjFaC"); NSLog(@"EgZu5O8cyTkJ9lvFIni2Q6UMr0L7tpS"); NSLog(@"gZEk49mCsa"); } -(void)aG4t0peBH76:(UICollectionView*) aG4t0peBH76 aZNwCMQ:(UIView*) aZNwCMQ aohvXHxbiM:(UISwitch*) aohvXHxbiM aRXV2Gp7:(UIDevice*) aRXV2Gp7 ap93XPTVbd:(UIActivity*) ap93XPTVbd aJbL4szYl:(UIControl*) aJbL4szYl avGPr:(UICollectionView*) avGPr a1F9z:(UIMenuItem*) a1F9z a9tBW5UN:(UIMenuItem*) a9tBW5UN ahKlScNq:(UIKeyCommand*) ahKlScNq aoQlNm17:(UIRegion*) aoQlNm17 aHwCr1b:(UIControl*) aHwCr1b ao8nJKq4mXb:(UIRegion*) ao8nJKq4mXb ajT6nF:(UIColor*) ajT6nF aIx4aENwFMZ:(UIFontWeight*) aIx4aENwFMZ aoHxC:(UIControlEvents*) aoHxC aHDzS:(UIViewController*) aHDzS { NSLog(@"afX3DzPZ9rh"); NSLog(@"pAP8nQzlO0xY"); NSLog(@"8wqgDk5AoT"); NSLog(@"ZeEMNzdbYgDyV0xijUqsKOwWLTI9lmSB"); NSLog(@"cOuYgwS7b8jL"); NSLog(@"uTEWV9AvCm0twobk1ZR"); NSLog(@"JLR5vbk6UpKQ0gNCarud8xVP9WXSqsIMf"); NSLog(@"wt8KQYXmLUu7alTOP3B5x2NVWpEj4Gfydr"); NSLog(@"e1QDkNm4LxJVyGtWg82SXuh75KbdCAlfZM"); NSLog(@"D5oWbVYg3RKJqPlmQiNpCGU"); NSLog(@"RlIcsTVHdNhyCDwAX2Q3kUiJeZoap4q7BmFft9"); NSLog(@"tGk8M3SYD9uLse"); NSLog(@"3g7fCNhaUuH8D0Gnrbeo9x1EMSRymvdkVLWI"); NSLog(@"JWc1ZfhGr4ObKMBVo58AgXTp67yDmqtYs3Q"); NSLog(@"6wZn9gb17uymMFOtsQr"); NSLog(@"3G5InNvkoP1M42E680dJSbpYWB"); NSLog(@"sY1CIL4yoi9BvTr8buagfdXczkn0P"); } @end