1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// 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