SearchHistoryTableViewCell.m
1.41 KB
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
//
// SearchHistoryTableViewCell.m
// ChineseBonStu
//
// Created by huayu on 16/3/23.
// Copyright © 2016年 huayu. All rights reserved.
//
#import "SearchHistoryTableViewCell.h"
@implementation SearchHistoryTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.backgroundColor = [UIColor clearColor];
_titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(12, 10, MainScreenWidth - 24, 24)];
_titleLabel.textColor = HEXCOLOR(0xa1a1a1);
_titleLabel.font = [UIFont systemFontOfSize:12];
_titleLabel.backgroundColor = [UIColor clearColor];
[self addSubview:_titleLabel];
_closeBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
_closeBtn.frame = CGRectMake(MainScreenWidth - 22, 17, 10, 10);
[_closeBtn setBackgroundImage:[UIImage imageNamed:@"close"] forState:UIControlStateNormal];
[self addSubview:_closeBtn];
_darkLine = [[UIImageView alloc] initWithFrame:CGRectMake(12, 43, MainScreenWidth - 24, 1)];
_darkLine.backgroundColor = Color_Line;
[self addSubview:_darkLine];
}
return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end