NewVoiceTableViewCell.m
1.98 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
45
46
47
48
49
50
51
52
53
54
//
// NewVoiceTableViewCell.m
// SCIOLiveCN
//
// Created by huayu on 16/12/9.
// Copyright © 2016年 huayu. All rights reserved.
//
#import "NewVoiceTableViewCell.h"
@implementation NewVoiceTableViewCell
- (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, 66)];
_bgView.backgroundColor = [UIColor whiteColor];
[self addSubview:_bgView];
_titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, _bgView.frame.size.width - 20, 40)];
_titleLabel.numberOfLines = 2;
_titleLabel.backgroundColor = [UIColor blueColor];
_titleLabel.textColor = HEXCOLOR(0x333333);
_titleLabel.font = [UIFont systemFontOfSize:16];
[_bgView addSubview:_titleLabel];
_timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 45, _bgView.frame.size.width - 80, 10)];
_timeLabel.backgroundColor = [UIColor redColor];
_timeLabel.textColor = HEXCOLOR(0x666666);
_timeLabel.font = [UIFont systemFontOfSize:12];
[_bgView addSubview:_timeLabel];
_soundImage = [[UIImageView alloc] initWithFrame:CGRectMake(_bgView.frame.size.width - 70, 45, 11, 11)];
[_bgView addSubview:_soundImage];
_lengthLabel = [[UILabel alloc] initWithFrame:CGRectMake(_bgView.frame.size.width - 50, 45, 40, 10)];
_lengthLabel.backgroundColor = [UIColor clearColor];
_lengthLabel.textColor = HEXCOLOR(0x666666);
_lengthLabel.font = [UIFont systemFontOfSize:12];
[_bgView addSubview:_lengthLabel];
}
return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end