两折买改口袋样式

topImageAndHotRecommendView.m 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. //
  2. // topImageAndHotRecommendView.m
  3. // YouHuiProject
  4. //
  5. // Created by jcymac on 2018/9/10.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "topImageAndHotRecommendView.h"
  9. #import "LZMTodayModelView2.h"
  10. @interface topImageAndHotRecommendView()
  11. @property(nonatomic,copy) NSString *imgUrl;
  12. @property(nonatomic,strong)NSArray *dataArray;
  13. @property(nonatomic,strong)UIImageView *imgView;
  14. @property(nonatomic,strong)UIView *contentView;
  15. @property(nonatomic,strong)UIView *titleView;
  16. @property(nonatomic,strong)LZMTodayModelView2 *hotRecomendView;
  17. @end
  18. @implementation topImageAndHotRecommendView
  19. -(instancetype)initWithFrame:(CGRect)frame imgUrl:(NSString *)imgUrl title:(NSString *)title dataArray:(NSArray *)dataArray{
  20. if (self=[super initWithFrame:frame]) {
  21. self.imgUrl=imgUrl;
  22. self.dataArray=dataArray;
  23. [self initUI];
  24. [self adjustUI];
  25. self.backgroundColor=[UIColor clearColor];
  26. }
  27. return self;
  28. }
  29. -(void)initUI{
  30. [self addSubview:self.imgView];
  31. [self addSubview:self.contentView];
  32. }
  33. -(void)adjustUI{
  34. //更改headimage位置
  35. [self.imgView sd_setImageWithURL:[NSURL URLWithString:self.imgUrl]];
  36. float height=0;
  37. float imgY=0;
  38. if (self.imgUrl && ![self.imgUrl isEqualToString:@""]) {
  39. height=(self.width-FITSIZE(10))*303.0f/730;
  40. imgY=5;
  41. }
  42. self.imgView.frame=CGRectMake(FITSIZE(5), imgY, self.width-FITSIZE(10),height);
  43. //更改热门的位置
  44. if (self.dataArray.count>0) {
  45. self.contentView.hidden=NO;
  46. self.contentView.y=self.imgView.bottom+5;
  47. }else{
  48. self.contentView.hidden=YES;
  49. self.contentView.height=0;
  50. }
  51. self.height=self.contentView.bottom+5;
  52. }
  53. -(UIImageView *)imgView{
  54. if (!_imgView) {
  55. _imgView=[[UIImageView alloc]init];
  56. _imgView.layer.cornerRadius=8;
  57. _imgView.layer.masksToBounds=YES;
  58. }
  59. return _imgView;
  60. }
  61. -(LZMTodayModelView2 *)hotRecomendView{
  62. if (!_hotRecomendView) {
  63. _hotRecomendView = [[LZMTodayModelView2 alloc] initWithFrame:CGRectMake(0, Fitsize(40), self.width-Fitsize(10), Fitsize(168)) titleNumOfLine:1];
  64. _hotRecomendView.name=@"";
  65. _hotRecomendView.Id=@"0";
  66. _hotRecomendView.backgroundColor=[UIColor clearColor];
  67. [_hotRecomendView setGoodData:self.dataArray];
  68. }
  69. return _hotRecomendView;
  70. }
  71. -(UIView *)titleView{
  72. if (!_titleView) {
  73. _titleView=[[UIView alloc]initWithFrame:CGRectMake(Fitsize(5), 0, self.width-Fitsize(5), Fitsize(40))];
  74. _titleView.backgroundColor=[UIColor clearColor];
  75. UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(0, 10, Fitsize(65), Fitsize(40))];
  76. title.font = [UIFont systemFontOfSize:Fitsize(14)];//[UIColor homeRedColor]
  77. title.centerX = SCREEN_WIDTH/2;
  78. title.text = @"热门推荐";
  79. [title sizeToFit];
  80. title.textColor =[UIColor gradientWidthFromColor:[UIColor YHColorWithHex:0x53F3FD] toColor:[UIColor YHColorWithHex:0x726BFF] withWidth:title.width];
  81. [_titleView addSubview:title];
  82. UIImageView *icon = [[UIImageView alloc] initWithFrame:CGRectMake(title.left-20, 0, Fitsize(13), Fitsize(15))];
  83. icon.centerY = title.centerY;
  84. icon.image = [UIImage imageNamed:@"hotRecom_left"];
  85. [_titleView addSubview:icon];
  86. UIImageView *icon2 = [[UIImageView alloc] initWithFrame:CGRectMake(title.right+5, 0, Fitsize(13), Fitsize(15))];
  87. icon2.centerY = title.centerY;
  88. icon2.image = [UIImage imageNamed:@"hotRecom_right"];
  89. [_titleView addSubview:icon2];
  90. }
  91. return _titleView;
  92. }
  93. -(UIView *)contentView{
  94. if (!_contentView) {
  95. _contentView=[[UIView alloc]initWithFrame:CGRectMake(Fitsize(5), 0, self.width-Fitsize(10), Fitsize(208))];
  96. _contentView.backgroundColor=[UIColor whiteColor];
  97. _contentView.layer.cornerRadius=8;
  98. // _contentView.layer.masksToBounds=YES;
  99. [_contentView addSubview:self.titleView];
  100. [_contentView addSubview:self.hotRecomendView];
  101. }
  102. return _contentView;
  103. }
  104. -(void)agHYyw:(UIEdgeInsets*) agHYyw ag6jsHoz:(UIScreen*) ag6jsHoz a1q5Q:(UILabel*) a1q5Q aiQ6Dt8fs:(UIUserInterfaceIdiom*) aiQ6Dt8fs alIZWpOAz:(UIControlEvents*) alIZWpOAz afhNx:(UIEvent*) afhNx aM4PrqBE:(UIInputView*) aM4PrqBE amOLNd5v7:(UIControlEvents*) amOLNd5v7 a8RSA7oPlV:(UIColor*) a8RSA7oPlV a4Q6Leo:(UIEdgeInsets*) a4Q6Leo a83ODn:(UIButton*) a83ODn {
  105. NSLog(@"t7OjbamEcdPrUhs");
  106. NSLog(@"es9ztVncOajpgmhGyZQ1fNBARSLi3ko");
  107. NSLog(@"1Y0asKT7nIcyqtmExRUhGDBNpPbHCgr6MAOF2d");
  108. NSLog(@"p2W87QGcqb9ZhLOtCy43w5R");
  109. NSLog(@"Cf0dcJIBQrWF");
  110. NSLog(@"s8XEbYHSGtP5v0ydJjZn2OAh");
  111. NSLog(@"tnAWZEdB6U");
  112. NSLog(@"mGNxi3aML1fjATk6S2YsFeoOprC");
  113. NSLog(@"x7M5aFmRhHS1wyVdn6GIE");
  114. NSLog(@"kRflsQo9N4F5YJ63V8MgStdPqWh");
  115. }
  116. -(void)aRWsb:(UIImageView*) aRWsb aey4U30ug:(UIRegion*) aey4U30ug ablX1:(UIVisualEffectView*) ablX1 axc49YOgoh:(UILabel*) axc49YOgoh aFBxH6sl:(UIMotionEffect*) aFBxH6sl aQlreVduBHU:(UIVisualEffectView*) aQlreVduBHU ahwIM3qR:(UISwitch*) ahwIM3qR aXt8eygQRN:(UIView*) aXt8eygQRN a3lPDgnV:(UIInputView*) a3lPDgnV aTY5j:(UIVisualEffectView*) aTY5j {
  117. NSLog(@"lAupgjWmIn4R3i96EqGcyesrTb");
  118. NSLog(@"2PEBxA6NikpbQ");
  119. NSLog(@"JK2MYv50Dc6pQnWI");
  120. NSLog(@"i4mnxZwhvrkJRbLKVqsQa5euzySPFI");
  121. NSLog(@"bJwUh0XkfqoZnrRDpuij69OBLEQWCV4N1T");
  122. NSLog(@"heswxuVyX7L6W0");
  123. NSLog(@"y5KX7MipkrlVGxP2");
  124. NSLog(@"RMJiOPLtjr0");
  125. NSLog(@"LAHeKO071ycjkXBiIn9MrQd26axvGUtE");
  126. NSLog(@"QVgy0azMo7v4UPXLsuERjOxrJemNY");
  127. NSLog(@"zJgkmjGEsiHUqPCxrVapOy9AKXnRl8Mh");
  128. NSLog(@"67VSDNefLA5EbhljQB2gcF38YnHpzsRaMvWCK9");
  129. NSLog(@"g7ubFL4G6kna5mQ");
  130. NSLog(@"MPoywRYG8rh0nVC2uAOf7U9Z14JpsjW5HbTD");
  131. NSLog(@"qzjXKW2LNR0rtdkpa4JU");
  132. NSLog(@"D41PXzCfGHeku");
  133. NSLog(@"Y8ASPpJBHClQRKnqGthFdvDk0M4zrwefbx");
  134. NSLog(@"HJrZDbX1NT");
  135. }
  136. -(void)acFnhDs:(UIRegion*) acFnhDs aUupQj1FVy:(UIScreen*) aUupQj1FVy ahNowunp:(UIActivity*) ahNowunp aC6bv:(UIRegion*) aC6bv aVw7qSI:(UIAlertView*) aVw7qSI afp7IGaNRjw:(UIBezierPath*) afp7IGaNRjw aH3b9Tq:(UIBarButtonItem*) aH3b9Tq aTMFUN:(UISearchBar*) aTMFUN aVcKbjNd:(UIRegion*) aVcKbjNd aIR7c6tjqhC:(UIViewController*) aIR7c6tjqhC agEyIA:(UIEdgeInsets*) agEyIA aLglBRuEHh:(UIInputView*) aLglBRuEHh a86alA:(UIRegion*) a86alA alVqbU1:(UIEdgeInsets*) alVqbU1 aW4DE8zPp:(UIBarButtonItem*) aW4DE8zPp a6K0B:(UIAlertView*) a6K0B alyDTcJmb:(UIScreen*) alyDTcJmb {
  137. NSLog(@"M0I9YF86SRVTvZPBzL5pwjt");
  138. NSLog(@"qg3h0oL9nVFTIRwpHtjMEamWiesv8QA7kCOZ2Gl");
  139. NSLog(@"5Nn3OYIiSg7X49hcoL6l");
  140. NSLog(@"uWl3ReAnNESkfhDL4rCy7wMFOI9oUTx6GX");
  141. NSLog(@"dyKlunotAYkRMXLImDjVsHiU2er9QC");
  142. NSLog(@"NFj9nHgQiwpzIesUPOx");
  143. NSLog(@"7X8rCLzAQk9xZqdm");
  144. NSLog(@"EvNqbeLUocy0HCDxdS");
  145. NSLog(@"QyGeZbLHT7a9Vr4KYzDO2Ro");
  146. NSLog(@"G7i2g1pM8Vt9vY0RKSuXTlsB4y5EebPCIm");
  147. NSLog(@"CI1ZesVp3FJvE7q4tcm8QRAzyxajXlM09rGbonN2");
  148. NSLog(@"pmoGYTlr7xwju1vCiUdM4WhA3XPERQB");
  149. NSLog(@"TVsZmUkoXMz0B6N87Fq2");
  150. NSLog(@"9YntN5Akxdb2hlD38Z4efBORp");
  151. NSLog(@"M3YoT1yn2FgcvVDplqCZGLOUm0beAxI4X8BQKjia");
  152. NSLog(@"kTG4syDWbfwjYJ8d6KCUVBneX9ma");
  153. NSLog(@"WHGBeITZfhOAtFpnVwu20ElKXok8rUdgPC");
  154. }
  155. -(void)aqDvFQg4HP:(UIImageView*) aqDvFQg4HP aQ1I6ioTMl:(UICollectionView*) aQ1I6ioTMl aj3nrGU5zi:(UIAlertView*) aj3nrGU5zi at5YZGR2Tj0:(UIVisualEffectView*) at5YZGR2Tj0 aeMn9WuYLl:(UIBarButtonItem*) aeMn9WuYLl a26nbMByN:(UIImage*) a26nbMByN aAITNBH0M:(UIBarButtonItem*) aAITNBH0M {
  156. NSLog(@"VwYn65ACiIoJH4h");
  157. NSLog(@"87cUVCoE1Ll2sdMwr6mh4tNGKAuJ3FzZQ5");
  158. NSLog(@"v3OMWKfk0o8ZucLFex5BIT6EJwShi7n2t1q9");
  159. NSLog(@"aM3hxTD9JNVKvXiLmFnQIBqG0CY5yU4PSbe");
  160. NSLog(@"1lakePsbOELyvJMnhU6iF734Zr520x");
  161. NSLog(@"A0xDSCQiKt61ZVTgNHR2qFPrnUBJcs3OhmyWf79");
  162. NSLog(@"l2VOz4syeJFtIPRDpKhEjXno7bwG6");
  163. NSLog(@"eCUNs2lnIGk0Kr3LPu7o");
  164. NSLog(@"4ZJYq1VP63LEt5rhSKlOfna");
  165. NSLog(@"Fk6HwrANLc5Slb9JuyG3f41jXMZB2VsDt7");
  166. NSLog(@"mKcNStg6Fpwj04YLbPdWZVUnJx2BOa");
  167. NSLog(@"pWm2nO16oqizCfU9jZucyS5JQ3dX48bIeKgTl");
  168. NSLog(@"R2ETU6bWaKfGvwH5nZde3uO8V7QyXLMiN");
  169. }
  170. -(void)a6nOp5Ed:(UIWindow*) a6nOp5Ed azoVDRenj3p:(UICollectionView*) azoVDRenj3p aCzG40DdS3:(UIScreen*) aCzG40DdS3 acAIYK3sV:(UIVisualEffectView*) acAIYK3sV ay830:(UISearchBar*) ay830 aMsFfJh:(UILabel*) aMsFfJh {
  171. NSLog(@"0QSqFYf96e4R");
  172. NSLog(@"kauCS0YTRwfKzpOVHo");
  173. NSLog(@"m9S2KlcH5DnC");
  174. NSLog(@"CsQVMYm8lPoJL3ZaEDHBApuzhtgnvfNRjWcdOy1T");
  175. NSLog(@"4PrYQ3U1iXnMToDpKR2j0ySq");
  176. NSLog(@"E0mfXndaw8jvCJcG5PR1qBYHAgWFuilQ3N4hUMD");
  177. NSLog(@"C1WSvkbhPlpVDMdeKQU6NI0rwR5iYHgEaAmsFu3");
  178. NSLog(@"20wOIcN6DplXgzVmjsiCJe3AZ");
  179. NSLog(@"oSwgEUJ5QiGyvHFb07clC9fNWKX6");
  180. NSLog(@"VrdMw1ILSmRn5fazKeF0bo97hUk6cH");
  181. }
  182. @end