66// Copyright (c) 2015年 Coding. All rights reserved.
77//
88
9- #define kTaskActivityCell_LeftPading 20.0
10- #define kTaskActivityCell_LeftPading 20.0
11- #define kTaskActivityCell_LeftContentPading (kTaskActivityCell_LeftPading + 40 )
12- #define kTaskActivityCell_ContentWidth (kScreen_Width - kTaskActivityCell_LeftContentPading - kTaskActivityCell_LeftPading )
9+ #define kTaskActivityCell_LeftContentPading (kPaddingLeftWidth + 40 )
10+ #define kTaskActivityCell_ContentWidth (kScreen_Width - kTaskActivityCell_LeftContentPading - kPaddingLeftWidth )
1311
1412#import " TaskActivityCell.h"
1513
@@ -34,7 +32,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
3432 }
3533 if (!_tipIconView) {
3634 CGFloat borderWidth = 2 ;
37- _tipIconView = [[UIImageView alloc ] initWithFrame: CGRectMake (kTaskActivityCell_LeftPading - borderWidth, 10 , 25 + 2 *borderWidth, 25 + 2 *borderWidth)];
35+ _tipIconView = [[UIImageView alloc ] initWithFrame: CGRectMake (kPaddingLeftWidth - borderWidth, 10 , 25 + 2 *borderWidth, 25 + 2 *borderWidth)];
3836 _tipIconView.contentMode = UIViewContentModeCenter;
3937
4038 _tipIconView.layer .masksToBounds = YES ;
@@ -45,7 +43,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
4543 [self .contentView addSubview: _tipIconView];
4644 }
4745 if (!_contentLabel) {
48- _contentLabel = [[UITTTAttributedLabel alloc ] initWithFrame: CGRectMake (kTaskActivityCell_LeftContentPading , 10 , kTaskActivityCell_ContentWidth , 15 )];
46+ _contentLabel = [[UITTTAttributedLabel alloc ] initWithFrame: CGRectMake (kTaskActivityCell_LeftContentPading , 13 , kTaskActivityCell_ContentWidth , 15 )];
4947 _contentLabel.numberOfLines = 0 ;
5048 [self .contentView addSubview: _contentLabel];
5149 }
@@ -114,10 +112,10 @@ + (NSAttributedString *)attrContentWithObj:(ProjectActivity *)curActivity{
114112 }
115113
116114 attrContent = [[NSMutableAttributedString alloc ] initWithString: [NSString stringWithFormat: @" %@ %@ " , userName, contentStr]];
117- [attrContent addAttributes: @{NSFontAttributeName : [UIFont boldSystemFontOfSize: 12 ],
115+ [attrContent addAttributes: @{NSFontAttributeName : [UIFont boldSystemFontOfSize: 13 ],
118116 NSForegroundColorAttributeName : [UIColor colorWithHexString: @" 0x222222" ]}
119117 range: NSMakeRange (0 , userName.length)];
120- [attrContent addAttributes: @{NSFontAttributeName : [UIFont systemFontOfSize: 12 ],
118+ [attrContent addAttributes: @{NSFontAttributeName : [UIFont systemFontOfSize: 13 ],
121119 NSForegroundColorAttributeName : [UIColor colorWithHexString: @" 0x999999" ]}
122120 range: NSMakeRange (userName.length + 1 , contentStr.length)];
123121
@@ -136,7 +134,7 @@ + (CGFloat)cellHeightWithObj:(id)obj{
136134 if ([obj isKindOfClass: [ProjectActivity class ]]) {
137135 NSAttributedString *attrContent = [self attrContentWithObj: obj];
138136 CGFloat contentHeight = [attrContent boundingRectWithSize: CGSizeMake (kTaskActivityCell_ContentWidth , CGFLOAT_MAX) options: NSStringDrawingUsesLineFragmentOrigin context: nil ].size .height ;
139- cellHeight = ceilf (contentHeight + 20 );
137+ cellHeight = ceilf (contentHeight + 26 );
140138 cellHeight = MAX (44 , cellHeight);
141139 }
142140 return cellHeight;
0 commit comments