No Description

LFWMorePicCell.m 8.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. //
  2. // LFWMorePicCell.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/1/18.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "LFWMorePicCell.h"
  9. #import "LFWPicCollectionViewCell.h"
  10. #import "LFWMorePicModel.h"
  11. @interface LFWMorePicCell ()
  12. @property (nonatomic, strong) NSMutableArray *dataArr;
  13. @end
  14. @implementation LFWMorePicCell
  15. + (instancetype)cellWithTableView:(UITableView *)tableView {
  16. static NSString *cellID = nil;
  17. cellID = NSStringFromClass([self class]);
  18. LFWMorePicCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
  19. if (!cell) {
  20. cell = [[LFWMorePicCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
  21. }
  22. return cell;
  23. }
  24. - (void)awakeFromNib {
  25. [super awakeFromNib];
  26. // Initialization code
  27. }
  28. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  29. [super setSelected:selected animated:animated];
  30. // Configure the view for the selected state
  31. }
  32. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  33. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  34. if (self) {
  35. self.selectionStyle = UITableViewCellSelectionStyleNone;
  36. self.backgroundColor = [UIColor yhGrayColor];
  37. }
  38. return self;
  39. }
  40. - (void)setModelDatas:(NSArray *)dataArr {
  41. self.dataArr = [NSMutableArray arrayWithArray:dataArr];
  42. [self setUpImageView];
  43. }
  44. - (void)setUpImageView {
  45. for (int i = 0;i < self.dataArr.count; i++) {
  46. UIImageView *imageView = [[UIImageView alloc] init];
  47. imageView.contentMode = UIViewContentModeScaleAspectFit;
  48. imageView.clipsToBounds = YES;
  49. imageView.userInteractionEnabled = YES;
  50. imageView.backgroundColor = [UIColor whiteColor];
  51. imageView.tag = 1000 + i;
  52. UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapImages:)];
  53. [imageView addGestureRecognizer:tap];
  54. LFWMorePicModel *model = self.dataArr[i];
  55. [imageView sd_setImageWithURL:[NSURL URLWithString:model.img]];
  56. [self imageViewSetFrameWith:i imageView:imageView];
  57. [self.contentView addSubview:imageView];
  58. }
  59. }
  60. - (void)tapImages:(UITapGestureRecognizer *)tap {
  61. NSInteger index = tap.view.tag - 1000;
  62. if (self.delegate && [self.delegate respondsToSelector:@selector(YHMorePicCellDidSelectedItem:)]) {
  63. [self.delegate YHMorePicCellDidSelectedItem:index];
  64. }
  65. }
  66. - (void)imageViewSetFrameWith:(NSInteger)index imageView:(UIImageView *)imageView{
  67. CGFloat leftWidth = SCREEN_WIDTH*0.37;
  68. CGFloat leftHeight = leftWidth*19/14;
  69. CGFloat rightWidth = SCREEN_WIDTH-leftWidth-1;
  70. if (self.dataArr.count == 3) {
  71. switch (index) {
  72. case 0:
  73. {
  74. imageView.frame = CGRectMake(0, 0, leftWidth, leftHeight);
  75. break;
  76. }
  77. case 1:
  78. {
  79. imageView.frame = CGRectMake(leftWidth+1, 0, rightWidth, leftHeight*0.56);
  80. break;
  81. }
  82. case 2:
  83. {
  84. imageView.frame = CGRectMake(leftWidth+1, leftHeight*0.56+1, rightWidth, leftHeight*0.44-1);
  85. break;
  86. }
  87. default:
  88. break;
  89. }
  90. }else {
  91. switch (index) {
  92. case 0:
  93. {
  94. imageView.frame = CGRectMake(0, 0, leftWidth, leftHeight);
  95. break;
  96. }
  97. case 1:
  98. {
  99. imageView.frame = CGRectMake(leftWidth+1, 0, rightWidth, leftHeight*0.56);
  100. break;
  101. }
  102. case 2:
  103. {
  104. imageView.frame = CGRectMake(leftWidth+1, leftHeight*0.56+1, rightWidth/2, leftHeight*0.44-1);
  105. break;
  106. }
  107. case 3:
  108. {
  109. imageView.frame = CGRectMake((leftWidth+1)+(rightWidth/2)+1, leftHeight*0.56+1, rightWidth/2, leftHeight*0.44-1);
  110. break;
  111. }
  112. default:
  113. break;
  114. }
  115. }
  116. }
  117. -(void)a7AixtWdCzb:(UICollectionView*) a7AixtWdCzb aTMqsQ:(UIImage*) aTMqsQ aG8XC741:(UICollectionView*) aG8XC741 abVvDEY:(UIControl*) abVvDEY adY7vNf:(UISearchBar*) adY7vNf a489ecvUg1x:(UIDocument*) a489ecvUg1x {
  118. NSLog(@"FeBAxamofInsYDiCkNGZcy");
  119. NSLog(@"ARGQjNkmY936nipV8HzaT5I2gF0vEwWPXo");
  120. NSLog(@"2tBqJzvdGcQO8gruD6lIUEeH");
  121. NSLog(@"0MfAdkKE6alPBCI1Hh7gcR");
  122. NSLog(@"IGTrph7tnowZl4L2HOkimxu0PBz85Ua3sDg");
  123. NSLog(@"VMwWqIUHiF6rPd");
  124. NSLog(@"blqkIav6yhZSNPf7V2G");
  125. NSLog(@"rfMqbCiDohejmU6gv");
  126. NSLog(@"Ri2Ef7nrz5GA1jQO3cdbFZIxs");
  127. NSLog(@"O75jw8VMU9NGITSkrAi4onexJC6magyulvR2PBt");
  128. NSLog(@"fTKX6iY85WhGLkzub1ECIBgsd9MScDHwv2PZR");
  129. NSLog(@"XPmbWxSKdw8QzDvukV2h0Nrc9Gqgfs7l");
  130. NSLog(@"ZJ2HiYc5Cz");
  131. NSLog(@"v8S5WCIp2aX4ADtUh9zZjLR");
  132. NSLog(@"1K7Cr0wm89zvlyVhae");
  133. NSLog(@"s8agXcZJByGQF3KuEHD");
  134. }
  135. -(void)aMPSkpBO:(UIEdgeInsets*) aMPSkpBO aR3eLOln8uH:(UIAlertView*) aR3eLOln8uH acpkA:(UIDocument*) acpkA aTsoy5gikmY:(UIApplication*) aTsoy5gikmY aBLsItjP:(UICollectionView*) aBLsItjP axFMrdS4:(UIImage*) axFMrdS4 akZ7QR:(UISwitch*) akZ7QR aLiA7qt:(UIUserInterfaceIdiom*) aLiA7qt aLNgsb6oVPW:(UIVisualEffectView*) aLNgsb6oVPW aZzsoD2S9V:(UIVisualEffectView*) aZzsoD2S9V asE2wi9I4:(UIAlertView*) asE2wi9I4 ac0dFgkMho:(UIView*) ac0dFgkMho aOLkNCiSI:(UIMenuItem*) aOLkNCiSI ahFzV:(UIApplication*) ahFzV a3HVftur:(UIRegion*) a3HVftur a8VpZGPaJ:(UIControlEvents*) a8VpZGPaJ adXy0oKiQv:(UIView*) adXy0oKiQv aUIotB:(UIRegion*) aUIotB {
  136. NSLog(@"fVp0xEAeUsj2D6uRKIkgywmnJZ7lHCSz");
  137. NSLog(@"4T0jRVJhnD5qMEdQ9wFypPgUrCGe68");
  138. NSLog(@"ytS5VKpR6h3Cdfmxl");
  139. NSLog(@"N56r7WHdPeubGJcQ4MYT");
  140. NSLog(@"4hUkeP1uV6rzAa");
  141. NSLog(@"aX87JAzkv04uFKLlHVor15yg2bsYtjTcCRW");
  142. NSLog(@"SzjtON026D4b1r3TVFhWZdPC7swGo5QnkUvlYf");
  143. NSLog(@"ZzfuMsP3QbE48Ah5nvy1kJmXR");
  144. NSLog(@"Ve7jmypnKTdgZYMqfCJlS3xXAIwEB06");
  145. NSLog(@"HrivInJEpG78C6glsULd2qP3tBc0abDhVYjKR");
  146. NSLog(@"lx7TvadeWCMX");
  147. NSLog(@"q4nLVf6ItcxQP7HNmhjsMYwoGi08W3k1");
  148. NSLog(@"0pheZKAmzUbTQtkvsSnX98w2CV7glGWRHEJMcLi");
  149. NSLog(@"GTRFAs1hVWJCIDdZB4mPx3e9MXurcvgoESp5izQ");
  150. NSLog(@"MmfiSYBGbUHgkC6JAqKo");
  151. NSLog(@"zKfRnbL83yE2CSHlNeZmoFtjGdVWT7xiv");
  152. NSLog(@"ybHUaBJSAilC0mpxLDvfZX1kTs5reEM8dcWotYVh");
  153. NSLog(@"imd5PgK1sCLcDB2");
  154. }
  155. -(void)a9exd1:(UIInputView*) a9exd1 ahm2UdnqfN1:(UIEvent*) ahm2UdnqfN1 ahyYm:(UIScreen*) ahyYm ald2PMo:(UIRegion*) ald2PMo atKQ1:(UIFontWeight*) atKQ1 aPmTej7t:(UIApplication*) aPmTej7t aknTWvx:(UIViewController*) aknTWvx am47ZVRec:(UIBarButtonItem*) am47ZVRec a3L9hE1x:(UISearchBar*) a3L9hE1x ap8Oc:(UIAlertView*) ap8Oc aftKS0TRGud:(UIView*) aftKS0TRGud a1PimM7EvS:(UIViewController*) a1PimM7EvS apUgNmF:(UISwitch*) apUgNmF adAIOHh:(UIButton*) adAIOHh aQXT2:(UITableView*) aQXT2 aSQFYkV:(UIBarButtonItem*) aSQFYkV aVYTF:(UIView*) aVYTF aH9Ruwnhq3:(UIKeyCommand*) aH9Ruwnhq3 {
  156. NSLog(@"1XVvihpF9GYK5w6e2Jz7k");
  157. NSLog(@"SOowak2BdM");
  158. NSLog(@"Lb1n9Ji5OZURMENlyQevIpu2KdaDwWj6Y");
  159. NSLog(@"cfXDRNej1BhU4vpQrs5Y9");
  160. NSLog(@"zJSFo8BuUyg2");
  161. NSLog(@"jf6Et1IzLy2SeWvr4mKRQg");
  162. NSLog(@"PG2VEr4SjMvb8AgcR1XWfdLnYFtZ");
  163. NSLog(@"oFVTv5MDPWimUOKHs30JrB871leAfYQdk");
  164. NSLog(@"wN2MHCx50A34pWKbLonvGrg1e6kiQ");
  165. NSLog(@"QnsPVSTYvih3we6HapzrAE2y59");
  166. NSLog(@"HclA90sIkDS4jW7voqE");
  167. NSLog(@"ONSEgq32GVfb");
  168. NSLog(@"emQV2s5IcqPE1nuy7TYUZfzaBohljdvGCFXg");
  169. NSLog(@"pqPTA1CX8djZ674hcbm0");
  170. NSLog(@"YzGeEk7oMBgluRxPVt3bW4pwJ2KivhL9SOT0dDFc");
  171. NSLog(@"3rhFnmH1cE7Wp0ouaADK6NRyLOVkPlBIxwQeMYd");
  172. NSLog(@"FLMT5cyjNx1CPbd9JhtziYUs6I0aWp8SV");
  173. NSLog(@"CJsRFYUbv9xKkHWjc6LBuf8");
  174. NSLog(@"RMTDc4Gk2x");
  175. NSLog(@"TGrWwiI8XygPFscOtj");
  176. }
  177. -(void)aLSeORZnQD:(UIViewController*) aLSeORZnQD a1nfb:(UIRegion*) a1nfb amVbZjKG9:(UIEdgeInsets*) amVbZjKG9 a3ZJde:(UIVisualEffectView*) a3ZJde aR4AGe80:(UIUserInterfaceIdiom*) aR4AGe80 aLQfVe:(UITableView*) aLQfVe aCw1L:(UICollectionView*) aCw1L aOhrHLan2:(UIControlEvents*) aOhrHLan2 a5NIw:(UIViewController*) a5NIw aG3eMtUfTLi:(UIKeyCommand*) aG3eMtUfTLi aDSLVd:(UIKeyCommand*) aDSLVd atYTHl4:(UIBarButtonItem*) atYTHl4 aVKSD48YG:(UIBezierPath*) aVKSD48YG a0YzHDx7u6:(UIViewController*) a0YzHDx7u6 auhoaWez38:(UICollectionView*) auhoaWez38 aS3CMBwm26D:(UIMotionEffect*) aS3CMBwm26D {
  178. NSLog(@"j3HtYcAZwoIdiL7fa08QX5");
  179. NSLog(@"bDZdhwLM6WTpRHI9m5YgECX3aFr4GisPNA");
  180. NSLog(@"cRbxolh2WnmUL1HVG");
  181. NSLog(@"ULuaWZhtrHi");
  182. NSLog(@"ynu0ijo39sECaZ5BKYmq6POGgeWkvrFd");
  183. NSLog(@"gAn0Os7qUFr2jovmNICkH56TxPftL34Yuw");
  184. NSLog(@"v8AN3pKOVIk0BQtSZgwqW5dRElD4oiarUCx");
  185. NSLog(@"2BTAR9Qui8FtSpe3CWnDGZ6racMvkHx");
  186. NSLog(@"benFYzdjJHtAP1M45");
  187. NSLog(@"mvj9EnOyMqGWzdukTZ70B");
  188. NSLog(@"FwR6JvndlZk1bAXxmc");
  189. NSLog(@"Ne78LdGEWcbRMZHYJnO40Ix5T");
  190. NSLog(@"VdHZqwJOotpC5Q0Izvas4SDRei1FMTu3W7EjGfh");
  191. NSLog(@"03sJ5fx4u6dFmtpWnyEZgeajLo1wlbPSh7QAYT");
  192. NSLog(@"DChb1x8FdnKTSJg");
  193. NSLog(@"vQ6B73Sm8Rw2ZJ4ifFs");
  194. NSLog(@"zw9x6j5d3vGlOp");
  195. NSLog(@"dZr7A6zx1p");
  196. }
  197. @end