123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- //
- // LFWMorePicCollectionCell.m
- // YouHuiProject
- //
- // Created by jcymac on 2018/4/24.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "LFWMorePicCollectionCell.h"
- #import "LFWMorePicCollectionViewCell.h"
- #import "LFWMorePicCollectionModel.h"
- @interface LFWMorePicCollectionCell()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
- @property(nonatomic,strong)UICollectionView *collectionView;
- @property (nonatomic, strong) NSMutableArray *dataArr;
- @end
- @implementation LFWMorePicCollectionCell
- static NSInteger sumCell=0;
- -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
- if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
-
- }
- return self;
-
- }
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- - (void)setModelDatas:(NSArray *)dataArr {
- self.dataArr = [NSMutableArray arrayWithArray:dataArr];
- sumCell=self.dataArr.count;
- _collectionView=nil;
- for (UIView *view in self.subviews) {
- if ([view isKindOfClass:[UICollectionView class]]) {
- [view removeFromSuperview];
- }
- }
-
-
- [self addSubview:self.collectionView];
- // [self.collectionView reloadData];
- }
- #pragma mark -UICollectionViewDataSource
- - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
- if (self.dataArr==nil||self.dataArr.count==0) {
- return 0;
- }
- return self.dataArr.count;
- }
- - ( UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
- LFWMorePicCollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"picCollectionViewCell" forIndexPath:indexPath];
- if (!cell) {
-
- }
- LFWMorePicCollectionModel *model=self.dataArr[indexPath.row];
- cell.titleLabel.text=model.name;
- [cell.picImageView sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@""]];
- return cell;
- }
- - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section{
- return 0;
- }
- - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section{
- return 0;
- }
- -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
- if (self.delegate && [self.delegate respondsToSelector:@selector(YHMorePicCollectionCellDidSelectedItem:)]) {
- [self.delegate YHMorePicCollectionCellDidSelectedItem:indexPath.row];
- }
- }
- - (UICollectionView *)collectionView {
- if (!_collectionView) {
- UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
- CGFloat leftWidth = SCREEN_WIDTH*0.37;
- CGFloat leftHeight = leftWidth*19/14;
- if (sumCell==0) {
- sumCell=4;
- }
- NSInteger offWidth=0;
- NSInteger offHeight=20;
- if (iPhone5) {
- offHeight=40;
- }
- switch (sumCell) {
- case 3:
- {
- offWidth=FITSIZE(-20);
- }
- break;
- case 4:
- {
- offWidth=FITSIZE(10);
- }
- break;
- case 5:
- {
- offWidth=FITSIZE(10);
- if(iPhone5){
- offWidth=FITSIZE(30);
- }
- }
- break;
-
- default:
- break;
- }
- flowLayout.itemSize = CGSizeMake(SCREEN_WIDTH/sumCell, SCREEN_WIDTH/sumCell+offWidth);
- _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, leftHeight+offHeight) collectionViewLayout:flowLayout];
- _collectionView.backgroundColor=[UIColor clearColor];
- _collectionView.delegate = self;
- _collectionView.dataSource = self;
- [_collectionView registerNib:[UINib nibWithNibName:@"LFWMorePicCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@"picCollectionViewCell"];
- }
- return _collectionView;
- }
- -(void)a4t61:(UIScreen*) a4t61 anKHtpZrJy:(UIView*) anKHtpZrJy aTXWs9fyJe:(UIBarButtonItem*) aTXWs9fyJe ac8qsi4LTp:(UIImageView*) ac8qsi4LTp aODgboB89F:(UILabel*) aODgboB89F {
- NSLog(@"To8X6RBpGOfM5lKcuwj4hdH2Zims");
- NSLog(@"uoP1kBIQsaFrUy");
- NSLog(@"DPFxyfroilaS");
- NSLog(@"HC1Yj3PVFx");
- NSLog(@"vXmV8sSdQpKAaxNW5ZjTOPU0IJ1nLYiqw7hz");
- NSLog(@"JWTLaz4PyCmhYbNMI3S1E9pGon28UwA");
- NSLog(@"hv3SDxPmWd");
- NSLog(@"DzjaAZ76N8XkuylQ2md");
- NSLog(@"jnh2KTNce6DtPgC8QEWiI4LoM");
- NSLog(@"jFfgmBTzG6VCM0Rx97");
- NSLog(@"dFvwlIUBy4D");
- NSLog(@"2hR9HUbOv4a3jT5moMLqcP7ngGJy8CpVsxW6BZ");
- }
- -(void)acP2yL:(UIImageView*) acP2yL a2gl76er9:(UIKeyCommand*) a2gl76er9 a8IlkJMR:(UISwitch*) a8IlkJMR asZ08H6boXe:(UIMenuItem*) asZ08H6boXe akOSavLcD:(UIScreen*) akOSavLcD acnJ1G45R:(UIImageView*) acnJ1G45R ajArYPSmE:(UIApplication*) ajArYPSmE ap9Ahbnq:(UIEdgeInsets*) ap9Ahbnq aM5f8d3Icj:(UIKeyCommand*) aM5f8d3Icj aE71uGC:(UIControl*) aE71uGC aDxkBIPf7:(UIUserInterfaceIdiom*) aDxkBIPf7 ahrKFOm:(UICollectionView*) ahrKFOm aqeRCXn:(UIVisualEffectView*) aqeRCXn aChvk:(UIImageView*) aChvk acShs7Y:(UIWindow*) acShs7Y {
- NSLog(@"MaXBcO9LlW87vSo2mQ");
- NSLog(@"tWPwDBSOCglQ8b");
- NSLog(@"tyKMOxBnX8T5Q1JRUp7V4N");
- NSLog(@"inMV4SI5tsdvqP8L");
- NSLog(@"WmNrs8H0gOoMfdSB13AC");
- NSLog(@"N40uiegRvyVSaGn3W");
- NSLog(@"8YLKgpWZcheVvOEbqSGkXT5C0P1f2djyHDw7i");
- NSLog(@"ATYWKwNZVR6hd");
- NSLog(@"oNPx7QS3ZUFhbnafzB");
- NSLog(@"SQqNvatOJd5xErPuk43");
- }
- -(void)as7GEJcnbZh:(UIButton*) as7GEJcnbZh aVApSZw9On:(UIActivity*) aVApSZw9On aRlo2S9:(UIFontWeight*) aRlo2S9 azHy8ABxRW:(UISearchBar*) azHy8ABxRW avMXt:(UIInputView*) avMXt aFRweH:(UIImageView*) aFRweH aqUAOJE:(UIView*) aqUAOJE adlmp1C:(UIAlertView*) adlmp1C alYzBkEymfd:(UIDevice*) alYzBkEymfd a1RCyaJL07E:(UIEvent*) a1RCyaJL07E ajvDwi3CrX:(UIWindow*) ajvDwi3CrX azhBy:(UIButton*) azhBy a5v4DVuI:(UIAlertView*) a5v4DVuI aGRlp:(UIImage*) aGRlp anh8fD:(UITableView*) anh8fD {
- NSLog(@"Ru4h31vmMZJWiaLylnsBVGIcgOD7YdU");
- NSLog(@"XZcV7Hut4xOqKh3lrmz0W8pPM2YNaRdUveb");
- NSLog(@"JvOBulb34Y9gGhNjK5FZIw");
- NSLog(@"D98YbP1TtM25myWO7XKBpiwhZdnLsUoJerRaHj63");
- NSLog(@"JXwU7vTxnk1LzRaN5EdcepA2rZ9V648tM");
- NSLog(@"HkJyNcqi6fMYG2ZwaO7KQXB");
- NSLog(@"Sc8jma9rnqGv1QwugsBMA5JCxE7foRV0UiOk");
- NSLog(@"cZaBEdyGS0e81hqw7uDHJoWQNPUMVsziR");
- NSLog(@"q1JFhBeyNLMT");
- NSLog(@"j0SxYFRvKyEL2BpuVP");
- NSLog(@"Lmo1AJDOdEI9QsPB");
- NSLog(@"d8Twx1FkPoJAUegRl0bQVWfLv");
- NSLog(@"Kd3bBl2s9QPSm6qvNLCJDxiM7oH");
- NSLog(@"hALFjSQiqJkOeDabs");
- }
- -(void)afIz6:(UISwitch*) afIz6 aPwbhOmHJ:(UIAlertView*) aPwbhOmHJ aIq5Zh:(UIMotionEffect*) aIq5Zh aWugV:(UIEdgeInsets*) aWugV aA1yWXvwso:(UIFontWeight*) aA1yWXvwso {
- NSLog(@"cpYMeADo2uJ4ZgSOt9r");
- NSLog(@"A40s8CGVJDNlc9aI7tW");
- NSLog(@"QmvbKHLoaw5JiW4PB7FXtpUjgMR9GdV");
- NSLog(@"JfmgoPDh4WvArVkj");
- NSLog(@"Ev7gJf6uPFS5");
- NSLog(@"82MZPJynzgbLs491epWHNX3KVEATi");
- NSLog(@"MvzXKIL3SopQrebRT1HYl");
- NSLog(@"eOFECmIARMX3l6");
- NSLog(@"KYrifRmItDE");
- NSLog(@"4T9Xy1KPsjNh0AFcuG");
- NSLog(@"DZj6fNrnCH");
- }
- -(void)aHPRgrN:(UIBarButtonItem*) aHPRgrN aPLnjaT6xS3:(UITableView*) aPLnjaT6xS3 abag7P:(UIViewController*) abag7P aImxgZHGK:(UISwitch*) aImxgZHGK aM3khxGXj:(UIControl*) aM3khxGXj acVUEIQLNCv:(UIColor*) acVUEIQLNCv aFy3V:(UILabel*) aFy3V aWyJk8NGadS:(UIMenuItem*) aWyJk8NGadS aGtVK7LD35:(UIVisualEffectView*) aGtVK7LD35 a5LmJhxrU:(UISwitch*) a5LmJhxrU abqItp9DxG:(UIButton*) abqItp9DxG a7fCP:(UIControl*) a7fCP aduzoUm4vF:(UIActivity*) aduzoUm4vF aJwijxG:(UILabel*) aJwijxG az0DHebk:(UIBezierPath*) az0DHebk {
- NSLog(@"e3X4a8pvN0EtMIxC6oOmPdW92i7V");
- NSLog(@"qHYv5NFWO1IL");
- NSLog(@"QCpokz4gv7S");
- NSLog(@"HzXYLpaMJjl2yB38ox4kwcqem0NbgdR");
- NSLog(@"GxCsTqpUvgwBobiMIV4ft2");
- NSLog(@"9pGBKvREqW2OwVfQjlxDYzSaskZcmTCXMy67LU");
- NSLog(@"XHRqACSTM9xwtBpdmPFe5uc8jNsgyQkrWb4");
- NSLog(@"qz5vnBK8thsLVPrW1CpeGjbJOgialRoST7E");
- NSLog(@"YwntDsieodZgNRJ4T50U89j");
- NSLog(@"z4yXfsOL93tnTCYoHE5exVqB60");
- NSLog(@"g2VwR8p4K3LrtdeUmW0l1fxijNM");
- NSLog(@"CNZITPJve89ul1dAa");
- NSLog(@"GCQ6KPZyf4g7UmaFhXDS");
- NSLog(@"jNq4ctzlAKUT0mM96IYGBp2kFd");
- }
- -(void)azqN9rplxL:(UILabel*) azqN9rplxL aSAQNqEaRW:(UIDevice*) aSAQNqEaRW aImDMb:(UIColor*) aImDMb aavTyzRM:(UIImage*) aavTyzRM aItUD:(UIImageView*) aItUD a6W15wrSi7:(UIEvent*) a6W15wrSi7 ataxzRm:(UIBezierPath*) ataxzRm {
- NSLog(@"O87945IMlk0ojLEpfiYwG");
- NSLog(@"cNDEVarGvPCATLIWbJYdg6zniO4HtQp5h9sRS0");
- NSLog(@"eAn5NKh26giuIvoQlOxrfBkcsSaRZwm");
- NSLog(@"iwB3CtgWqFoIAlM4ZaLy2pk1V5PuGEOdh8f");
- NSLog(@"5uAaC6hNviBM9S2j4Xxc");
- NSLog(@"nteSvGBO5rQRLJ");
- NSLog(@"jvbcdm7EClIezkYA829KLWU");
- NSLog(@"7Uz8P9jpJyIfomtTq6WriGwsDv5MEYe4Q");
- NSLog(@"jqMwROdfXchQblsiNYZ2TA6");
- NSLog(@"pEGNA3D6qrRoJ9d5B");
- NSLog(@"UCM3THEJtiwklc");
- NSLog(@"NdITbBaH0Uo9GLtZKpVQw4fOWACFcqjgMPsvelur");
- NSLog(@"Oaqc9MTP84tdY7vK3hXySrgjLwHViAm1GfxknUu");
- NSLog(@"jxMe8mNEsBw2d7bRLWTAOhZpXGP6kYuD3a1");
- NSLog(@"8GILt7QdnkibsUaqZrEPmTFB4KjH50cg");
- NSLog(@"fMNAmq4owZGya81P2X9");
- }
- -(void)a02bAgWdq:(UIColor*) a02bAgWdq aHoDq:(UIUserInterfaceIdiom*) aHoDq a0i8AW6NEn:(UIViewController*) a0i8AW6NEn aQDBEKORtX:(UIBarButtonItem*) aQDBEKORtX anJikPjxL:(UIBezierPath*) anJikPjxL a0uLf:(UIBarButtonItem*) a0uLf aAU2d5V:(UIFontWeight*) aAU2d5V awvuNEQpFPb:(UICollectionView*) awvuNEQpFPb aXGVoyYK8:(UIFont*) aXGVoyYK8 adfA4:(UIControl*) adfA4 abu0RTH7L:(UIVisualEffectView*) abu0RTH7L aB13ZlnDQ:(UISearchBar*) aB13ZlnDQ atZp7wfGrg:(UITableView*) atZp7wfGrg a7DgAY3d:(UIBezierPath*) a7DgAY3d abcaVfjsIp:(UIBezierPath*) abcaVfjsIp aplfsXi3:(UIBarButtonItem*) aplfsXi3 aW1EhoHDZGp:(UIFont*) aW1EhoHDZGp akaw72oQFX:(UIMotionEffect*) akaw72oQFX adnQ4URfM:(UIKeyCommand*) adnQ4URfM a2g67P:(UIMenuItem*) a2g67P {
- NSLog(@"Ev2hG6qLp1w");
- NSLog(@"mQAS12vwdMYL4FpEZb8BJa");
- NSLog(@"9unjfOwv4Jyr1sbVTQGD2FmKZi");
- NSLog(@"N5eEpLC4OD2avzcBoPljUiS6Zy18IWKfYkT3R9");
- NSLog(@"RT0CXzZ6BprE");
- NSLog(@"DM1w4Xr83liRgmK0F");
- NSLog(@"wYCkGOqAEStQP1mDBZdb6N2xuXlUR03J");
- NSLog(@"vBGonJXKIgbq3SaPR0jHr");
- NSLog(@"47orwZRWIYAOKQdf18ujlHhBVxXe65bqtiF");
- NSLog(@"BzXgZxkuSDw");
- NSLog(@"NBTjJy6rxgcGzVd");
- NSLog(@"uPARBrh4l9n3Gxa7UIveD1ocktCN");
- NSLog(@"FZw4dRucN0ygJEeAVp3tP2o9Khi1b7LOYXkQ6zC");
- NSLog(@"3a1O98kLiwRDIpXrP4MfBnxsHF6");
- NSLog(@"qbRs1O4KjTozGB0xW");
- NSLog(@"mdZXhr7u8Vg1JKQFexyqGwvIb6");
- NSLog(@"4MH5kpmBei81sUgwtYVX3hPNycdOlCxuFDjrZKE");
- NSLog(@"4loM6HGFNYQmZjuytTOW2gE");
- NSLog(@"Lv706lnwB3UutfXEbxQo1hi9TgyVIZ");
- NSLog(@"WbLyI9TBP8n0rXem1aqYMDOH3Siwfgz7vtQZ");
- }
- -(void)a8m4t6Zd5fh:(UITableView*) a8m4t6Zd5fh aaBNQz:(UITableView*) aaBNQz amt53n:(UIImage*) amt53n aZWABbKvUN:(UIFont*) aZWABbKvUN atzOC:(UIEdgeInsets*) atzOC aXRz03wI7aj:(UISwitch*) aXRz03wI7aj aNoGE0I:(UIUserInterfaceIdiom*) aNoGE0I aQJHRdgwhS:(UIFontWeight*) aQJHRdgwhS aHXg8:(UITableView*) aHXg8 aMjkNph:(UIEvent*) aMjkNph aulEaCI:(UIMotionEffect*) aulEaCI aiqGPul0oO:(UIInputView*) aiqGPul0oO aDIHGO:(UIBarButtonItem*) aDIHGO ac61P:(UISearchBar*) ac61P aEUxW:(UIButton*) aEUxW axepIDQtY:(UIControl*) axepIDQtY aBzauFy19df:(UIUserInterfaceIdiom*) aBzauFy19df aJKuf:(UIBarButtonItem*) aJKuf asl3MtkUA:(UITableView*) asl3MtkUA aNYcx9eX:(UIActivity*) aNYcx9eX {
- NSLog(@"8RXcMFagwnVoTbdvyGru6");
- NSLog(@"34KgbmaBTx7jz6GsQ");
- NSLog(@"oR2VZPqHUzvg1nakY7yQTupelcOxSKX5A");
- NSLog(@"g6QTwSiZhVIpkdylcb4uNJYKxDfL3rAqPXGOzsMC");
- NSLog(@"ZDprnYxbPILmHN9oOMw0QSRkTJG3");
- NSLog(@"uTFNYMiRxLV");
- NSLog(@"2GCzBQMdF7A3YvHLXIb86oPqjlWS5axDyu");
- NSLog(@"tOoymSAix6sq7kvlar3Mdj9NLeXZEYIJQP1WwDFG");
- NSLog(@"o3QRiYIxyL4MmselbGvPEpnrgHZJujAqfSC");
- NSLog(@"KhH49No51WwrfZDUgR2J");
- }
- -(void)aFVPcrCu:(UICollectionView*) aFVPcrCu aL4GBzCHOjY:(UIViewController*) aL4GBzCHOjY anX6qDTcf:(UIMotionEffect*) anX6qDTcf ajVYLkw4Hq1:(UIBarButtonItem*) ajVYLkw4Hq1 a4kf05Jl:(UIFont*) a4kf05Jl aJVvnbhrj:(UIBarButtonItem*) aJVvnbhrj aThCcQwAU:(UIMotionEffect*) aThCcQwAU aJlb9wrEtuo:(UIWindow*) aJlb9wrEtuo aorjX:(UIVisualEffectView*) aorjX {
- NSLog(@"TrHdJ4c60jaAiY2QtEWSnVvmo831Pe5");
- NSLog(@"CHlqiSb3fgvcJ8YwjDW4UE");
- NSLog(@"zn31YVMbtSwQF");
- NSLog(@"ByoCeAjsbcpUFTNS8hO5aVrEliufId627H");
- NSLog(@"cIqOXm30MK9");
- NSLog(@"uEveNQGYcqXHoOMKA");
- NSLog(@"Mxcu5WtCAwI7JRbmzfrTX0SqZPy8V6");
- NSLog(@"Uw86t0qbuyDKHjkrgmScMPRYxfAX7");
- NSLog(@"l0yHurwN7ThaLQs6vRIiUoPOcqkXgKM");
- NSLog(@"1eQlTAXszL9I76");
- NSLog(@"xp1JXyeTf8Oawl7D0vbKP3Yrsj5EmoU2qkZ6zG");
- NSLog(@"EKp0hJadDmoLSswR96UnHZOk");
- NSLog(@"5no3e8ql4bgIsCG0QUu7WNMdORHTx6XzaJjPF");
- NSLog(@"cq0hT6xRZtobUBY28kj4");
- NSLog(@"AW4qEFyOlQJts9nPf1bB");
- NSLog(@"VyDroLSQqWB2K9ihf6xZTPCNjsE1wXz8");
- NSLog(@"AtJ7oWuCZ3wvecGi0OnV");
- }
- -(void)ai4VpC6fHGs:(UIControlEvents*) ai4VpC6fHGs adDmitJ:(UIDocument*) adDmitJ aUoqJTulRh:(UIKeyCommand*) aUoqJTulRh axkSI:(UIUserInterfaceIdiom*) axkSI aZAzD:(UIDocument*) aZAzD aX3wzUvt8J:(UISearchBar*) aX3wzUvt8J aeIh5cFOT:(UIButton*) aeIh5cFOT ahYXfA7:(UIBarButtonItem*) ahYXfA7 aKyLY3:(UIUserInterfaceIdiom*) aKyLY3 anHWPd49:(UIInputView*) anHWPd49 aKTu08ZfWo:(UIBezierPath*) aKTu08ZfWo ayhKHWBoA:(UIApplication*) ayhKHWBoA a6dP7ou:(UIColor*) a6dP7ou {
- NSLog(@"mMfTLjHPYxEoDw3qigW4JvA5");
- NSLog(@"3ITBqJycnsVDHYzxLvk89am4ifSON");
- NSLog(@"jVyNRKIWhv7Yli51wEBU8GCFsqx32zAbZ");
- NSLog(@"W3euK4lk5tyxvqbJMF0");
- NSLog(@"eQVL9KcjR7oJ6XMh4ACNsbvIZ");
- NSLog(@"Pz9K1xwBLC4HRAVakrfGgIEJWch0OeiZ32l");
- NSLog(@"5rZOgt3ufhCo8xjByWkdARMYnKEm6aUHNGFwp");
- NSLog(@"QBIcx3RWDESdZgLXz");
- NSLog(@"EjrliQBYUxbh5Dc");
- NSLog(@"RAZ4le2yfFuJTkUsvxWhBi9b1CEQO6Kj0n");
- }
- @end
|