@@ -28,7 +28,7 @@ @implementation CodingTipCell
2828
2929static CGFloat user_icon_width = 35.0 ;
3030static CGFloat padding_height = 45 ;
31- static CGFloat padding_left = 65 .0 ;
31+ static CGFloat padding_left = 30 .0 ;
3232static CGFloat padding_between_content = 15.0 ;
3333static CGFloat target_height = 45.0 ;
3434
@@ -40,26 +40,28 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
4040 // Initialization code
4141 self.selectionStyle = UITableViewCellSelectionStyleNone;
4242 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+ // }
6365 if (!self.ownerNameBtn ) {
6466 self.ownerNameBtn = [UIButton buttonWithUserStyle ];
6567 self.ownerNameBtn .frame = CGRectMake (padding_left, 15 , 50 , 20 );
@@ -116,9 +118,10 @@ - (void)setCurTip:(CodingTip *)curTip{
116118// [self.ownerImgView sd_setImageWithURL:[@"" urlImageWithCodePathResizeToView:_ownerImgView] placeholderImage:kPlaceholderMonkeyRoundWidth(40.0)];
117119 NSString *userName = curTip.user_item .displayStr ;
118120
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;
122125 // owner姓名
123126 [self .ownerNameBtn setUserTitle: userName font: [UIFont systemFontOfSize: 17 ] maxWidth: (kCodingTipCell_WidthContent -80 )];
124127 // 时间
@@ -147,7 +150,8 @@ - (void)setCurTip:(CodingTip *)curTip{
147150 _targetBgBtn.hidden = YES ;
148151 }
149152 // 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)];
151155}
152156
153157- (void )targetBtnClicked {
0 commit comments