SelectedTableViewCell.m
1.44 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
40
41
42
43
44
//
// SelectedTableViewCell.m
// SCIOLiveCN
//
// Created by huayu on 16/12/9.
// Copyright © 2016年 huayu. All rights reserved.
//
#import "SelectedTableViewCell.h"
@implementation SelectedTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.backgroundColor = [UIColor clearColor];
_bgView = [[UIView alloc] initWithFrame:CGRectMake(12, 5, MainScreenWidth - 24, 56)];
_bgView.backgroundColor = [UIColor whiteColor];
_bgView.layer.masksToBounds = YES;
_bgView.layer.cornerRadius = 6.0;
[self addSubview:_bgView];
_titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, _bgView.frame.size.width - 20, 56)];
_titleLabel.numberOfLines = 2;
_titleLabel.backgroundColor = [UIColor clearColor];
_titleLabel.textColor = [UIColor whiteColor];
_titleLabel.font = [UIFont systemFontOfSize:15];
[_bgView addSubview:_titleLabel];
_playImage = [[UIImageView alloc] initWithFrame:CGRectMake(_bgView.frame.size.width - 37.5, (56 - 27.5)/2, 27.5, 27.5)];
[_bgView addSubview:_playImage];
}
return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end