-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy pathCommentTableViewCell.m
68 lines (52 loc) · 2.2 KB
/
CommentTableViewCell.m
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
// PLTableViewCell.m
// DSBBM
//
// Created by bisheng on 14-9-2.
// Copyright (c) 2014年 qt. All rights reserved.
//
#import "CommentTableViewCell.h"
@implementation CommentTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Initialization code
self.context = [[TQRichTextView alloc] initWithFrame:CGRectMake(150,48, 200, 25)];
self.context.textColor = [UIcol hexStringToColor:@"#787878"];
self.context.font = [UIFont systemFontOfSize:13];
self.context.userInteractionEnabled = NO;
self.context.backgroundColor = [UIColor clearColor];
self.name = [[UILabel alloc] initWithFrame:CGRectMake(92,15, 200, 25)];
self.name.font = [UIFont systemFontOfSize:11];
self.name.textColor = [UIcol hexStringToColor:@"#2e2e2e"];
self.createTime = [[UILabel alloc] initWithFrame:CGRectMake(150, 15, 160, 15)];
self.createTime.font = [UIFont systemFontOfSize:11];
self.createTime.textColor = [UIcol hexStringToColor:@"#bebebe"];
self.createTime.textAlignment = NSTextAlignmentRight;
self.image = [[UIImageView alloc] initWithFrame:CGRectMake(32, 15,50,50)];
self.image.layer.cornerRadius = 4;
self.image.layer.masksToBounds = YES;
self.line = [[UIView alloc] initWithFrame:CGRectMake(0,79.5, 320, 0.5)];
self.line.backgroundColor = [UIcol hexStringToColor:@"e6e6e6"];
UIImageView * icon = [[UIImageView alloc] initWithFrame:CGRectMake(10, 15, 12, 12)];
icon.image = [UIImage imageNamed:@"pinglunliebiao"];
[self addSubview:icon];
[self addSubview:self.createTime];
[self addSubview:self.line];
[self addSubview:self.image];
[self addSubview:self.name];
[self addSubview:self.context];
}
return self;
}
- (void)awakeFromNib
{
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end