-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAnliViewCell.m
83 lines (55 loc) · 2.15 KB
/
AnliViewCell.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//
// AnliViewCell.m
// CustomNewProject
//
// Created by lichaowei on 14/12/1.
// Copyright (c) 2014年 FBLIFE. All rights reserved.
//
#import "AnliViewCell.h"
#import "AnliModel.h"
@implementation AnliViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
}
return self;
}
//根据实际宽度等比例调整高度
- (CGFloat)height:(CGFloat)oldHeight
{
return 0;
}
- (void)awakeFromNib {
// Initialization code
self.smallImageView.layer.cornerRadius = _smallImageView.width / 2.f;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
- (void)setCellWithModel:(AnliModel *)aModel
{
[self.bigImageView sd_setImageWithURL:[NSURL URLWithString:aModel.pichead] placeholderImage:nil];
// NSLog(@"lll %@",aModel.pichead);
self.aTitleLabel.text = aModel.title;
self.nameLabel.text = aModel.sname;
[self.smallImageView sd_setImageWithURL:[NSURL URLWithString:aModel.spichead] placeholderImage:PERSONAL_DEFAULTS_IMAGE];
self.smallImageView.layer.masksToBounds = YES;
self.smallImageView.layer.cornerRadius = 30 / 2.f;
self.quanImageView.layer.masksToBounds = YES;
self.quanImageView.layer.cornerRadius = 34 / 2.f;
self.quanImageView.center = self.smallImageView.center;
// self.smallImageView.layer.borderWidth = 2.f;
// self.smallImageView.layer.borderColor = [UIColor colorWithWhite:1.0 alpha:0.4].CGColor;
self.nameLabel.layer.shadowColor = [UIColor blackColor].CGColor;
self.nameLabel.layer.shadowOffset = CGSizeMake(0,1);
self.nameLabel.layer.shadowRadius = 0.5;
self.nameLabel.layer.shadowOpacity = 0.8;
self.aTitleLabel.layer.shadowColor = [UIColor blackColor].CGColor;
self.aTitleLabel.layer.shadowOffset = CGSizeMake(0,1);
self.aTitleLabel.layer.shadowRadius = 0.5;
self.aTitleLabel.layer.shadowOpacity = 0.8;
//layer.cornerRadius
}
@end