-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy pathGrabTableViewCell.m
69 lines (53 loc) · 2.39 KB
/
GrabTableViewCell.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
69
//
// GrabTableViewCell.m
// DSBBM
//
// Created by bisheng on 14-10-16.
// Copyright (c) 2014年 qt. All rights reserved.
//
#import "GrabTableViewCell.h"
@implementation GrabTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Initialization code
self.avatar = [[UIImageView alloc] initWithFrame:CGRectMake(15, 15, 50, 50)];
self.avatar.layer.cornerRadius = 6;
self.avatar.layer.masksToBounds = YES;
[self addSubview:self.avatar];
self.nick = [[UILabel alloc] initWithFrame:CGRectMake(75, 21, 100, 20)];
self.nick.font = [UIFont systemFontOfSize:15];
self.nick.textColor = [UIcol hexStringToColor:@"2e2e2e"];
[self addSubview:self.nick];
self.distance = [[UILabel alloc] initWithFrame:CGRectMake(170, 21,65, 20)];
self.distance.textAlignment = NSTextAlignmentRight;
self.distance.textColor = [UIcol hexStringToColor:@"#bebebe"];
self.distance.font = [UIFont systemFontOfSize:11];
[self addSubview:self.distance];
UIImageView * starNull = [[UIImageView alloc] initWithFrame:CGRectMake(75, 44, 144, 18)];
starNull.image = [UIImage imageNamed:@"qiangxingxingkong"];
[self addSubview:starNull];
self.star = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 144, 18)];
self.star.clipsToBounds = YES;
[starNull addSubview:self.star];
UIImageView * starFull = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 144, 18)];
starFull.image = [UIImage imageNamed:@"qiangxingxingman"];
[self.star addSubview:starFull];
UIView * line = [[UIView alloc] initWithFrame:CGRectMake(250, 20, 0.5, 40)];
line.backgroundColor = [UIcol hexStringToColor:@"e6e6e6"];
[self addSubview:line];
UIView * line2 = [[UIView alloc] initWithFrame:CGRectMake(0, 79.5, 320, 0.5)];
line2.backgroundColor = [UIcol hexStringToColor:@"e6e6e6"];
[self addSubview:line2];
}
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