// // GXFPopCell.m // XFFruit // // Created by 陈俊俊 on 15/9/11. // Copyright (c) 2015年 Xummer. All rights reserved. // #import "GXFPopCell.h" #define GXFPopCell_Width ScreenSize.width - 20*2 @implementation GXFPopCell - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { [self bulidLayout]; } return self; } - (void)bulidLayout { self.addImageView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 15, 15, 15)]; self.addImageView.image = [UIImage imageNamed:@"add"]; self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.addImageView.frame)+ 10, 0, 100, 44))]; self.titleLabel.textAlignment= NSTextAlignmentLeft; self.titleLabel.textColor = GXF_PLACEHOLDER_COLOR; self.titleLabel.font = GXF_FIFTEENTEN_SIZE; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0, 44-1, GXFPopCell_Width, 1))]; self.lineLabel.backgroundColor = GXF_LINE_COLOR; [self.contentView addSubview:self.addImageView]; [self.contentView addSubview:self.titleLabel]; [self.contentView addSubview:self.lineLabel]; } - (void)setTitleStr:(NSString *)title{ self.titleLabel.text = title; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end