@@ -28,7 +28,7 @@ @implementation CodingTipCell
28
28
29
29
static CGFloat user_icon_width = 35.0 ;
30
30
static CGFloat padding_height = 45 ;
31
- static CGFloat padding_left = 65 .0 ;
31
+ static CGFloat padding_left = 30 .0 ;
32
32
static CGFloat padding_between_content = 15.0 ;
33
33
static CGFloat target_height = 45.0 ;
34
34
@@ -40,26 +40,28 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
40
40
// Initialization code
41
41
self.selectionStyle = UITableViewCellSelectionStyleNone;
42
42
self.backgroundColor = [UIColor clearColor ];
43
- if (!self.ownerImgView ) {
44
- self.ownerImgView = [[UITapImageView alloc ] initWithFrame: CGRectMake (kPaddingLeftWidth , 15 , user_icon_width, user_icon_width)];
45
- [self .ownerImgView doCircleFrame ];
46
-
47
- _ownerL = [[UILabel alloc ] initWithFrame: CGRectMake (0 , 0 , user_icon_width, user_icon_width)];
48
- _ownerL.backgroundColor = [UIColor clearColor ];
49
- _ownerL.font = [UIFont fontWithName: @" Chalkduster" size: 20 ];
50
- // PartyLetPlain
51
- // Chalkduster
52
- _ownerL.textColor = [UIColor colorWithHexString: @" 0x999999" ];
53
- _ownerL.textAlignment = NSTextAlignmentCenter;
54
- [self .ownerImgView addSubview: _ownerL];
55
-
56
- @weakify (self);
57
- [_ownerImgView addTapBlock: ^(id obj) {
58
- @strongify (self);
59
- [self userBtnClicked ];
60
- }];
61
- [self .contentView addSubview: self .ownerImgView];
62
- }
43
+ // if (!self.ownerImgView) {
44
+ // self.ownerImgView = [[UITapImageView alloc] initWithFrame:CGRectMake(kPaddingLeftWidth, 15, user_icon_width, user_icon_width)];
45
+ // [self.ownerImgView doCircleFrame];
46
+ //
47
+ // _ownerL = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, user_icon_width, user_icon_width)];
48
+ // _ownerL.backgroundColor = [UIColor clearColor];
49
+ // _ownerL.font = [UIFont fontWithName:@"Chalkduster" size:20];
50
+ // // _ownerL.font = [UIFont fontWithName:@"PartyLetPlain" size:20];
51
+ // // _ownerL.font = [UIFont systemFontOfSize:20];
52
+ // // PartyLetPlain
53
+ // // Chalkduster
54
+ // _ownerL.textColor = [UIColor colorWithHexString:@"0x999999"];
55
+ // _ownerL.textAlignment = NSTextAlignmentCenter;
56
+ // [self.ownerImgView addSubview:_ownerL];
57
+ //
58
+ // @weakify(self);
59
+ // [_ownerImgView addTapBlock:^(id obj) {
60
+ // @strongify(self);
61
+ // [self userBtnClicked];
62
+ // }];
63
+ // [self.contentView addSubview:self.ownerImgView];
64
+ // }
63
65
if (!self.ownerNameBtn ) {
64
66
self.ownerNameBtn = [UIButton buttonWithUserStyle ];
65
67
self.ownerNameBtn .frame = CGRectMake (padding_left, 15 , 50 , 20 );
@@ -116,9 +118,10 @@ - (void)setCurTip:(CodingTip *)curTip{
116
118
// [self.ownerImgView sd_setImageWithURL:[@"" urlImageWithCodePathResizeToView:_ownerImgView] placeholderImage:kPlaceholderMonkeyRoundWidth(40.0)];
117
119
NSString *userName = curTip.user_item .displayStr ;
118
120
119
- NSString *pinyin = [userName transformToPinyin ];
120
- NSString *username_first = pinyin.length > 0 ? [[pinyin substringToIndex: 1 ] uppercaseString ]: @" C" ;
121
- _ownerL.text = username_first;
121
+ // NSString *pinyin = [userName transformToPinyin];
122
+ // // NSString *pinyin = userName;
123
+ // NSString *username_first = pinyin.length > 0? [[pinyin substringToIndex:1] uppercaseString]: @"C";
124
+ // _ownerL.text = username_first;
122
125
// owner姓名
123
126
[self .ownerNameBtn setUserTitle: userName font: [UIFont systemFontOfSize: 17 ] maxWidth: (kCodingTipCell_WidthContent -80 )];
124
127
// 时间
@@ -147,7 +150,8 @@ - (void)setCurTip:(CodingTip *)curTip{
147
150
_targetBgBtn.hidden = YES ;
148
151
}
149
152
// unread
150
- [self .contentView addBadgeTip: _curTip.status.boolValue? @" " : kBadgeTipStr withCenterPosition: CGPointMake (_ownerImgView.center.x, CGRectGetMaxY (_ownerImgView.frame) + 10 )];
153
+ // [self.contentView addBadgeTip:_curTip.status.boolValue? @"": kBadgeTipStr withCenterPosition:CGPointMake(_ownerImgView.center.x, CGRectGetMaxY(_ownerImgView.frame) + 10)];
154
+ [self .contentView addBadgeTip: _curTip.status.boolValue? @" " : kBadgeTipStr withCenterPosition: CGPointMake (kPaddingLeftWidth + 4.0 , _ownerNameBtn.center.y)];
151
155
}
152
156
153
157
- (void )targetBtnClicked {
0 commit comments