// // CollectionViewCell.m // Haishenghai-master // // Created by GG on 2019/1/3. // Copyright © 2019年 Haishenghai intelligence network technology. All rights reserved. // #import "CollectionViewCell.h" @implementation CollectionViewCell - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { _topImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 80, 80)]; [self.contentView addSubview:_topImage]; _botlabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 80, 80, 40)]; _botlabel.textAlignment = NSTextAlignmentCenter; _botlabel.textColor = [UIColor blackColor]; _botlabel.numberOfLines =0; _botlabel.font = [UIFont systemFontOfSize:12]; // _botlabel.backgroundColor = [UIColor purpleColor]; [self.contentView addSubview:_botlabel]; } return self; } -(void)setModel:(deveceModel *)model{ _model = model; // NSString *str = [NSString stringWithFormat:@"https://www.hsh-iot.cn/%@",model.typePic]; // NSURL *imageURL = [NSURL URLWithString:str]; // NSData *imageData = [NSData dataWithContentsOfURL:imageURL]; // // _topImage.image =[UIImage imageWithData:imageData]; // _botlabel.text =model.typeExp; } @end