forked from huobazi/DSBBM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NewsTableViewCell.m
65 lines (51 loc) · 1.86 KB
/
NewsTableViewCell.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
//
// NewsTableViewCell.m
// DSBBM
//
// Created by bisheng on 14-9-17.
// Copyright (c) 2014年 qt. All rights reserved.
//
#import "NewsTableViewCell.h"
@implementation NewsTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Initialization code
[self createNewsCell];
}
return self;
}
-(void)createNewsCell{
_nickLable = [[UILabel alloc] initWithFrame:CGRectMake(67, 20, 100, 20)];
_nickLable.font = [UIFont systemFontOfSize:13];
_nickLable.textColor = [UIcol hexStringToColor:@"#343434"];
_chatLable = [[TQRichTextView alloc] initWithFrame:CGRectMake(67, 42, 140, 15)];
_chatLable.font = [UIFont systemFontOfSize:11];
_chatLable.backgroundColor = [UIColor clearColor];
_chatLable.textColor = [UIcol hexStringToColor:@"#76757b"];
_timeLable = [[UILabel alloc] initWithFrame:CGRectMake(200, 22, 98, 20)];
_timeLable.textAlignment = NSTextAlignmentRight;
_timeLable.font = [UIFont systemFontOfSize:10];
_timeLable.textColor = [UIcol hexStringToColor:@"#76757b"];
_avatar = [[UIImageView alloc] initWithFrame:CGRectMake(14, 16.5, 44, 44)];
_avatar.layer.cornerRadius = 8;
_avatar.layer.masksToBounds = YES;
UIView * line = [[UIView alloc] initWithFrame:CGRectMake(0,76.5 , 320, 0.5)];
line.backgroundColor = [UIcol hexStringToColor:@"#e6e6e6"];
[self addSubview:line];
[self addSubview:_avatar];
[self addSubview:_nickLable];
[self addSubview:_chatLable];
[self addSubview:_timeLable];
}
- (void)awakeFromNib
{
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end