123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- //
- // topImageAndHotRecommendView.m
- // YouHuiProject
- //
- // Created by jcymac on 2018/9/10.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "topImageAndHotRecommendView.h"
- #import "LZMTodayModelView2.h"
- @interface topImageAndHotRecommendView()
- @property(nonatomic,copy) NSString *imgUrl;
- @property(nonatomic,strong)NSArray *dataArray;
- @property(nonatomic,strong)UIImageView *imgView;
- @property(nonatomic,strong)UIView *contentView;
- @property(nonatomic,strong)UIView *titleView;
- @property(nonatomic,strong)LZMTodayModelView2 *hotRecomendView;
- @end
- @implementation topImageAndHotRecommendView
- -(instancetype)initWithFrame:(CGRect)frame imgUrl:(NSString *)imgUrl title:(NSString *)title dataArray:(NSArray *)dataArray{
- if (self=[super initWithFrame:frame]) {
- self.imgUrl=imgUrl;
- self.dataArray=dataArray;
- [self initUI];
- [self adjustUI];
- self.backgroundColor=[UIColor clearColor];
- }
- return self;
- }
- -(void)initUI{
- [self addSubview:self.imgView];
- [self addSubview:self.contentView];
- }
- -(void)adjustUI{
- //更改headimage位置
- [self.imgView sd_setImageWithURL:[NSURL URLWithString:self.imgUrl]];
- float height=0;
- float imgY=0;
- if (self.imgUrl && ![self.imgUrl isEqualToString:@""]) {
- height=(self.width-FITSIZE(10))*303.0f/730;
- imgY=5;
- }
- self.imgView.frame=CGRectMake(FITSIZE(5), imgY, self.width-FITSIZE(10),height);
- //更改热门的位置
- if (self.dataArray.count>0) {
- self.contentView.hidden=NO;
- self.contentView.y=self.imgView.bottom+5;
- }else{
- self.contentView.hidden=YES;
- self.contentView.height=0;
- }
- self.height=self.contentView.bottom+5;
- }
- -(UIImageView *)imgView{
- if (!_imgView) {
- _imgView=[[UIImageView alloc]init];
- _imgView.layer.cornerRadius=8;
- _imgView.layer.masksToBounds=YES;
- }
- return _imgView;
- }
- -(LZMTodayModelView2 *)hotRecomendView{
- if (!_hotRecomendView) {
- _hotRecomendView = [[LZMTodayModelView2 alloc] initWithFrame:CGRectMake(0, Fitsize(40), self.width-Fitsize(10), Fitsize(168)) titleNumOfLine:1];
- _hotRecomendView.name=@"";
- _hotRecomendView.Id=@"0";
- _hotRecomendView.backgroundColor=[UIColor clearColor];
- [_hotRecomendView setGoodData:self.dataArray];
- }
- return _hotRecomendView;
- }
- -(UIView *)titleView{
- if (!_titleView) {
- _titleView=[[UIView alloc]initWithFrame:CGRectMake(Fitsize(5), 0, self.width-Fitsize(5), Fitsize(40))];
- _titleView.backgroundColor=[UIColor clearColor];
- UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(0, 10, Fitsize(65), Fitsize(40))];
- title.font = [UIFont systemFontOfSize:Fitsize(14)];//[UIColor homeRedColor]
- title.centerX = SCREEN_WIDTH/2;
- title.text = @"热门推荐";
- [title sizeToFit];
- title.textColor =[UIColor gradientWidthFromColor:[UIColor YHColorWithHex:0x53F3FD] toColor:[UIColor YHColorWithHex:0x726BFF] withWidth:title.width];
- [_titleView addSubview:title];
- UIImageView *icon = [[UIImageView alloc] initWithFrame:CGRectMake(title.left-20, 0, Fitsize(13), Fitsize(15))];
- icon.centerY = title.centerY;
- icon.image = [UIImage imageNamed:@"hotRecom_left"];
- [_titleView addSubview:icon];
- UIImageView *icon2 = [[UIImageView alloc] initWithFrame:CGRectMake(title.right+5, 0, Fitsize(13), Fitsize(15))];
- icon2.centerY = title.centerY;
- icon2.image = [UIImage imageNamed:@"hotRecom_right"];
- [_titleView addSubview:icon2];
- }
- return _titleView;
- }
- -(UIView *)contentView{
- if (!_contentView) {
- _contentView=[[UIView alloc]initWithFrame:CGRectMake(Fitsize(5), 0, self.width-Fitsize(10), Fitsize(208))];
- _contentView.backgroundColor=[UIColor whiteColor];
- _contentView.layer.cornerRadius=8;
- // _contentView.layer.masksToBounds=YES;
- [_contentView addSubview:self.titleView];
- [_contentView addSubview:self.hotRecomendView];
- }
- return _contentView;
- }
- -(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 {
- NSLog(@"t7OjbamEcdPrUhs");
- NSLog(@"es9ztVncOajpgmhGyZQ1fNBARSLi3ko");
- NSLog(@"1Y0asKT7nIcyqtmExRUhGDBNpPbHCgr6MAOF2d");
- NSLog(@"p2W87QGcqb9ZhLOtCy43w5R");
- NSLog(@"Cf0dcJIBQrWF");
- NSLog(@"s8XEbYHSGtP5v0ydJjZn2OAh");
- NSLog(@"tnAWZEdB6U");
- NSLog(@"mGNxi3aML1fjATk6S2YsFeoOprC");
- NSLog(@"x7M5aFmRhHS1wyVdn6GIE");
- NSLog(@"kRflsQo9N4F5YJ63V8MgStdPqWh");
- }
- -(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 {
- NSLog(@"lAupgjWmIn4R3i96EqGcyesrTb");
- NSLog(@"2PEBxA6NikpbQ");
- NSLog(@"JK2MYv50Dc6pQnWI");
- NSLog(@"i4mnxZwhvrkJRbLKVqsQa5euzySPFI");
- NSLog(@"bJwUh0XkfqoZnrRDpuij69OBLEQWCV4N1T");
- NSLog(@"heswxuVyX7L6W0");
- NSLog(@"y5KX7MipkrlVGxP2");
- NSLog(@"RMJiOPLtjr0");
- NSLog(@"LAHeKO071ycjkXBiIn9MrQd26axvGUtE");
- NSLog(@"QVgy0azMo7v4UPXLsuERjOxrJemNY");
- NSLog(@"zJgkmjGEsiHUqPCxrVapOy9AKXnRl8Mh");
- NSLog(@"67VSDNefLA5EbhljQB2gcF38YnHpzsRaMvWCK9");
- NSLog(@"g7ubFL4G6kna5mQ");
- NSLog(@"MPoywRYG8rh0nVC2uAOf7U9Z14JpsjW5HbTD");
- NSLog(@"qzjXKW2LNR0rtdkpa4JU");
- NSLog(@"D41PXzCfGHeku");
- NSLog(@"Y8ASPpJBHClQRKnqGthFdvDk0M4zrwefbx");
- NSLog(@"HJrZDbX1NT");
- }
- -(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 {
- NSLog(@"M0I9YF86SRVTvZPBzL5pwjt");
- NSLog(@"qg3h0oL9nVFTIRwpHtjMEamWiesv8QA7kCOZ2Gl");
- NSLog(@"5Nn3OYIiSg7X49hcoL6l");
- NSLog(@"uWl3ReAnNESkfhDL4rCy7wMFOI9oUTx6GX");
- NSLog(@"dyKlunotAYkRMXLImDjVsHiU2er9QC");
- NSLog(@"NFj9nHgQiwpzIesUPOx");
- NSLog(@"7X8rCLzAQk9xZqdm");
- NSLog(@"EvNqbeLUocy0HCDxdS");
- NSLog(@"QyGeZbLHT7a9Vr4KYzDO2Ro");
- NSLog(@"G7i2g1pM8Vt9vY0RKSuXTlsB4y5EebPCIm");
- NSLog(@"CI1ZesVp3FJvE7q4tcm8QRAzyxajXlM09rGbonN2");
- NSLog(@"pmoGYTlr7xwju1vCiUdM4WhA3XPERQB");
- NSLog(@"TVsZmUkoXMz0B6N87Fq2");
- NSLog(@"9YntN5Akxdb2hlD38Z4efBORp");
- NSLog(@"M3YoT1yn2FgcvVDplqCZGLOUm0beAxI4X8BQKjia");
- NSLog(@"kTG4syDWbfwjYJ8d6KCUVBneX9ma");
- NSLog(@"WHGBeITZfhOAtFpnVwu20ElKXok8rUdgPC");
- }
- -(void)aqDvFQg4HP:(UIImageView*) aqDvFQg4HP aQ1I6ioTMl:(UICollectionView*) aQ1I6ioTMl aj3nrGU5zi:(UIAlertView*) aj3nrGU5zi at5YZGR2Tj0:(UIVisualEffectView*) at5YZGR2Tj0 aeMn9WuYLl:(UIBarButtonItem*) aeMn9WuYLl a26nbMByN:(UIImage*) a26nbMByN aAITNBH0M:(UIBarButtonItem*) aAITNBH0M {
- NSLog(@"VwYn65ACiIoJH4h");
- NSLog(@"87cUVCoE1Ll2sdMwr6mh4tNGKAuJ3FzZQ5");
- NSLog(@"v3OMWKfk0o8ZucLFex5BIT6EJwShi7n2t1q9");
- NSLog(@"aM3hxTD9JNVKvXiLmFnQIBqG0CY5yU4PSbe");
- NSLog(@"1lakePsbOELyvJMnhU6iF734Zr520x");
- NSLog(@"A0xDSCQiKt61ZVTgNHR2qFPrnUBJcs3OhmyWf79");
- NSLog(@"l2VOz4syeJFtIPRDpKhEjXno7bwG6");
- NSLog(@"eCUNs2lnIGk0Kr3LPu7o");
- NSLog(@"4ZJYq1VP63LEt5rhSKlOfna");
- NSLog(@"Fk6HwrANLc5Slb9JuyG3f41jXMZB2VsDt7");
- NSLog(@"mKcNStg6Fpwj04YLbPdWZVUnJx2BOa");
- NSLog(@"pWm2nO16oqizCfU9jZucyS5JQ3dX48bIeKgTl");
- NSLog(@"R2ETU6bWaKfGvwH5nZde3uO8V7QyXLMiN");
- }
- -(void)a6nOp5Ed:(UIWindow*) a6nOp5Ed azoVDRenj3p:(UICollectionView*) azoVDRenj3p aCzG40DdS3:(UIScreen*) aCzG40DdS3 acAIYK3sV:(UIVisualEffectView*) acAIYK3sV ay830:(UISearchBar*) ay830 aMsFfJh:(UILabel*) aMsFfJh {
- NSLog(@"0QSqFYf96e4R");
- NSLog(@"kauCS0YTRwfKzpOVHo");
- NSLog(@"m9S2KlcH5DnC");
- NSLog(@"CsQVMYm8lPoJL3ZaEDHBApuzhtgnvfNRjWcdOy1T");
- NSLog(@"4PrYQ3U1iXnMToDpKR2j0ySq");
- NSLog(@"E0mfXndaw8jvCJcG5PR1qBYHAgWFuilQ3N4hUMD");
- NSLog(@"C1WSvkbhPlpVDMdeKQU6NI0rwR5iYHgEaAmsFu3");
- NSLog(@"20wOIcN6DplXgzVmjsiCJe3AZ");
- NSLog(@"oSwgEUJ5QiGyvHFb07clC9fNWKX6");
- NSLog(@"VrdMw1ILSmRn5fazKeF0bo97hUk6cH");
- }
- @end
|