// // JSXQdetailCell.m // jitao // // Created by 罗云飞 on 2018/8/17. // Copyright © 2018年 罗云飞. All rights reserved. // #import "JSXQdetailCell.h" @implementation JSXQdetailCell - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { _biaoti = [UILabel new]; _biaoti.text = @"一种新型的美肤宝技术一种新型的美肤宝技术一电费水电费术水电费水电费术水电费水电费"; _biaoti.lineBreakMode = NSLineBreakByTruncatingTail; _biaoti.numberOfLines = 2; _biaoti.font = NewFont(fitScreenWidth(16)); _biaoti.textColor = NewBlackColor; [self.contentView addSubview:_biaoti]; _biaoti.sd_layout .leftSpaceToView(self.contentView, 15) .rightSpaceToView(self.contentView, 15) .topSpaceToView(self.contentView, 20) .autoHeightRatio(0) .maxHeightIs(fitScreenWidth(40)); _shouchangBT = [UIButton new]; [_shouchangBT setBackgroundColor:NewRedColor]; [self.contentView addSubview:_shouchangBT]; _shouchangBT.sd_layout .rightSpaceToView(self.contentView, 15) .topSpaceToView(_biaoti, 17) .heightIs(15) .widthIs(15); _shouchangNumber = [UILabel new]; _shouchangNumber.text = [NSString stringWithFormat:@"%@次收藏",@"3"]; _shouchangNumber.font = NewFont(13); [_shouchangNumber setSingleLineAutoResizeWithMaxWidth:0]; _shouchangNumber.textColor = [UIColor colorWithString:@"#AEAEAE"]; [self.contentView addSubview:_shouchangNumber]; _shouchangNumber.sd_layout .centerYEqualToView(_shouchangBT) .heightIs(14) .rightSpaceToView(_shouchangBT, 10); UILabel *line = [UILabel new]; line.backgroundColor = NewLineGrayColor; [self.contentView addSubview:line]; line.sd_layout .leftEqualToView(self.contentView) .heightIs(0.8) .rightEqualToView(self.contentView) .topSpaceToView(_shouchangBT, 15); UILabel *xuqiu = [UILabel new]; xuqiu.text = @"需求类型"; xuqiu.font = NewFont(fitScreenWidth(13)); [xuqiu setSingleLineAutoResizeWithMaxWidth:0]; xuqiu.textColor = [UIColor colorWithString:@"#AEAEAE"]; [self.contentView addSubview:xuqiu]; xuqiu.sd_layout .leftSpaceToView(self.contentView, 15) .topSpaceToView(line, 15) .heightIs(fitScreenWidth(13)); _xuqiuleixing = [UILabel new]; _xuqiuleixing.text = @"航空航天"; _xuqiuleixing.font = NewFont(13); _xuqiuleixing.textColor = NewBlackColor; [_xuqiuleixing setSingleLineAutoResizeWithMaxWidth:0]; [self.contentView addSubview:_xuqiuleixing]; _xuqiuleixing.sd_layout .leftSpaceToView(xuqiu, 15) .centerYEqualToView(xuqiu) .heightIs(fitScreenWidth(13)); UILabel *hangye = [UILabel new]; hangye.text = @"所属行业"; hangye.font = NewFont(fitScreenWidth(13)); [hangye setSingleLineAutoResizeWithMaxWidth:0]; hangye.textColor = [UIColor colorWithString:@"#AEAEAE"]; [self.contentView addSubview:hangye]; hangye.sd_layout .leftSpaceToView(self.contentView, 15) .topSpaceToView(xuqiu, 15) .heightIs(fitScreenWidth(13)); _suoshuhangye = [UILabel new]; _suoshuhangye.text = @"生物医药"; _suoshuhangye.font = NewFont(13); _suoshuhangye.textColor = NewBlackColor; [_suoshuhangye setSingleLineAutoResizeWithMaxWidth:0]; [self.contentView addSubview:_suoshuhangye]; _suoshuhangye.sd_layout .leftSpaceToView(hangye, 15) .centerYEqualToView(hangye) .heightIs(fitScreenWidth(13)); UILabel *guanjianci = [UILabel new]; guanjianci.text = @"关键词"; guanjianci.font = NewFont(fitScreenWidth(13)); [guanjianci setSingleLineAutoResizeWithMaxWidth:0]; guanjianci.textColor = [UIColor colorWithString:@"#AEAEAE"]; [self.contentView addSubview:guanjianci]; guanjianci.sd_layout .leftSpaceToView(self.contentView, 15) .topSpaceToView(hangye, 15) .heightIs(fitScreenWidth(13)); _guanjianci = [UILabel new]; _guanjianci.text = @"生物制药"; _guanjianci.font = NewFont(13); _guanjianci.textColor = NewBlackColor; [_guanjianci setSingleLineAutoResizeWithMaxWidth:0]; [self.contentView addSubview:_guanjianci]; _guanjianci.sd_layout .leftEqualToView(_suoshuhangye) .centerYEqualToView(guanjianci) .heightIs(fitScreenWidth(13)); UILabel *jiage = [UILabel new]; jiage.text = @"交易价格"; jiage.font = NewFont(fitScreenWidth(13)); [jiage setSingleLineAutoResizeWithMaxWidth:0]; jiage.textColor = [UIColor colorWithString:@"#AEAEAE"]; [self.contentView addSubview:jiage]; jiage.sd_layout .leftSpaceToView(_guanjianci, 55) .topSpaceToView(hangye, 15) .heightIs(fitScreenWidth(13)); _jiaoyijiage = [UILabel new]; _jiaoyijiage.font = NewFont(fitScreenWidth(13)); _jiaoyijiage.text = @"¥4500"; [_jiaoyijiage setSingleLineAutoResizeWithMaxWidth:0]; _jiaoyijiage.textColor = NewButtonColor; [self.contentView addSubview:_jiaoyijiage]; _jiaoyijiage.sd_layout .leftSpaceToView(jiage, 15) .heightIs(fitScreenWidth(13)) .centerYEqualToView(jiage); UILabel *line1 = [UILabel new]; line1.backgroundColor = NewLineGrayColor; [self.contentView addSubview:line1]; line1.sd_layout .leftEqualToView(self.contentView) .heightIs(10) .rightEqualToView(self.contentView) .topSpaceToView(jiage, 15); UILabel *xuqiujieshao = [UILabel new]; xuqiujieshao.text = @"需求介绍"; xuqiujieshao.font = NewFont(fitScreenWidth(14)); [xuqiujieshao setSingleLineAutoResizeWithMaxWidth:0]; [self.contentView addSubview:xuqiujieshao]; xuqiujieshao.sd_layout .leftSpaceToView(self.contentView, 15) .topSpaceToView(line1, 15) .heightIs(fitScreenWidth(14)); _xuqiuneirong = [UILabel new]; CGFloat height = [NewUtils heightforString:@"全景网,图片库,中国领先的图片库和正版图片素材网站;为个人提供正版图片素材,图片搜索,高清图片下载;为企业提供正版图片素材和影像传播解决方案。全景网,读图时代,美好全景网,图片库,中国领先的图片库和正版图片素材网站;为个人提供正版图片素材,图片搜索,高清图片下载;为企业提供正版图片素材和影像传播解决方案。全景网,读图时代,美好。" andWidth:SCREEN_WIDTH-30 fontSize:fitScreenWidth(13)]; _xuqiuneirong.text = @"全景网,图片库,中国领先的图片库和正版图片素材网站;为个人提供正版图片素材,图片搜索,高清图片下载;为企业提供正版图片素材和影像传播解决方案。全景网,读图时代,美好全景网,图片库,中国领先的图片库和正版图片素材网站;为个人提供正版图片素材,图片搜索,高清图片下载;为企业提供正版图片素材和影像传播解决方案。全景网,读图时代,美好。"; _xuqiuneirong.textColor = [UIColor colorWithString:@"#6C6C6C"]; _xuqiuneirong.font = NewFont(fitScreenWidth(13)); _xuqiuneirong.numberOfLines = 0; [self.contentView addSubview:_xuqiuneirong]; _xuqiuneirong.sd_layout .leftSpaceToView(self.contentView, 15) .rightSpaceToView(self.contentView, 15) .topSpaceToView(xuqiujieshao, 15) .heightIs(height); } 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 } @end