// // TabbarDeiceSecdCell.m // Ifish // // Created by imac on 16/7/28. // Copyright © 2016年 lianxiang. All rights reserved. // #import "TabbarDeiceSecdCell.h" @implementation TabbarDeiceSecdCell -(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { CGFloat Space =kScreenSize.width*0.028; CGFloat xiaoQiImgW= kScreenSize.width - Space*2; CGFloat ImH= xiaoQiImgW * 0.597; CGFloat HSpace =TabContentHeaght * 0.011; self.xiaoQiImg = [[UIImageView alloc] initWithFrame:CGRectMake(Space, HSpace, xiaoQiImgW, ImH)]; self.xiaoQiImg.image = [UIImage imageNamed:@"device_downbanner"]; self.xiaoQiImg.contentMode= UIViewContentModeScaleAspectFit; [self addSubview:self.xiaoQiImg]; CGFloat aplpaBH = TabContentHeaght * 0.05; self.aplpaback = [[UIView alloc] initWithFrame:CGRectMake(Space, CGRectGetMaxY(self.xiaoQiImg.frame) - aplpaBH, xiaoQiImgW , aplpaBH)]; self.aplpaback.backgroundColor = [UIColor blackColor]; self.aplpaback.alpha = 0.6; [self addSubview:self.aplpaback]; self.deataiLabel = [[UILabel alloc] initWithFrame:CGRectMake(10,0, xiaoQiImgW - 10, aplpaBH)]; self.deataiLabel.text = @"小7摄像头-远程鱼儿管家"; self.deataiLabel.textColor = [UIColor whiteColor]; self.deataiLabel.font = [UIFont systemFontOfSize:13]; [self.aplpaback addSubview:self.deataiLabel]; self.jiageLabel = [[UILabel alloc] init]; CGFloat TitleW = 80; CGFloat TitleH = aplpaBH; self.jiageLabel.frame = CGRectMake( xiaoQiImgW - TitleW ,0, TitleW, TitleH); self.jiageLabel.text = @"¥169"; self.jiageLabel.font = [UIFont fontWithName:@ "Arial Rounded MT Bold" size:(17.0)]; self.jiageLabel.textColor = [UIColor colorWithRed:233.0/255.0 green:133.0/255.0 blue:26.0/255.0 alpha:1]; self.jiageLabel.textAlignment = NSTextAlignmentCenter; [self.aplpaback addSubview:self.jiageLabel]; [self.aplpaback bringSubviewToFront:self.jiageLabel]; self.backgroundColor = [UIColor whiteColor]; } return self; } -(void)layoutIfNeeded{ } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end