Skip to content

Commit 76dd288

Browse files
committed
修改了小细节
1 parent f63224c commit 76dd288

4 files changed

Lines changed: 5 additions & 34 deletions

File tree

Coding_iOS/Controllers/DynamicCommentCell.m

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
4848
}
4949
if (!_ownerIconView) {
5050
CGFloat borderWidth = 2;
51-
5251
UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake(kPaddingLeftWidth - borderWidth, curBottomY, 28+ 2*borderWidth, 28 + 2*borderWidth)];
5352
bgView.backgroundColor = kColorTableBG;
54-
5553
_ownerIconView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 28, 28)];
5654
_ownerIconView.layer.masksToBounds = YES;
5755
_ownerIconView.layer.cornerRadius = _ownerIconView.frame.size.width/2;
@@ -61,7 +59,6 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
6159
make.width.height.mas_equalTo(28.0);
6260
make.center.equalTo(bgView);
6361
}];
64-
6562
[self.contentView addSubview:bgView];
6663
}
6764
if (!_contentLabel) {
@@ -106,7 +103,6 @@ - (void)setCurComment:(ProjectLineNote *)curComment{
106103
}
107104
CGFloat curBottomY = 15;
108105
[_ownerIconView sd_setImageWithURL:[_curComment.author.avatar urlImageWithCodePathResizeToView:_ownerIconView] placeholderImage:kPlaceholderMonkeyRoundWidth(33.0)];
109-
110106
NSString *contentStr = _curComment.content;
111107
[_contentLabel setLongString:contentStr withFitWidth:kTaskCommentCell_ContentWidth];
112108
for (HtmlMediaItem *item in _curComment.htmlMedia.mediaItems) {
@@ -120,18 +116,18 @@ - (void)setCurComment:(ProjectLineNote *)curComment{
120116
self.imageCollectionView.hidden = NO;
121117
[self.imageCollectionView setFrame:CGRectMake(kTaskCommentCell_LeftContentPading, curBottomY, kTaskCommentCell_ContentWidth, [DynamicCommentCell imageCollectionViewHeightWithCount:imagesCount])];
122118
[self.imageCollectionView reloadData];
123-
}else{
119+
} else {
124120
self.imageCollectionView.hidden = YES;
125121
}
126122
curBottomY += [DynamicCommentCell imageCollectionViewHeightWithCount:imagesCount];
127123
[_timeLabel setY:curBottomY];
128124
_timeLabel.text = [NSString stringWithFormat:@"%@ 发布于 %@", _curComment.author.name,[_curComment.created_at stringDisplay_HHmm]];
129125
}
130126

131-
- (void)configTop:(BOOL)isTop andBottom:(BOOL)isBottom{
127+
- (void)configTop:(BOOL)isTop andBottom:(BOOL)isBottom {
132128
if (isTop && isBottom) {
133129
_timeLineView.hidden = YES;
134-
}else{
130+
} else {
135131
_timeLineView.hidden = NO;
136132
[_timeLineView mas_remakeConstraints:^(MASConstraintMaker *make) {
137133
make.width.mas_equalTo(2.0);
@@ -142,7 +138,7 @@ - (void)configTop:(BOOL)isTop andBottom:(BOOL)isBottom{
142138
}
143139
}
144140

145-
+ (CGFloat)cellHeightWithObj:(id)obj{
141+
+ (CGFloat)cellHeightWithObj:(id)obj {
146142
CGFloat cellHeight = 0;
147143
if ([obj isKindOfClass:[ProjectLineNote class]]) {
148144
ProjectLineNote *curComment = (ProjectLineNote *)obj;
@@ -154,7 +150,7 @@ + (CGFloat)cellHeightWithObj:(id)obj{
154150
return cellHeight;
155151
}
156152

157-
+ (CGFloat)imageCollectionViewHeightWithCount:(NSInteger)countNum{
153+
+ (CGFloat)imageCollectionViewHeightWithCount:(NSInteger)countNum {
158154
if (countNum <= 0) {
159155
return 0;
160156
}
@@ -163,7 +159,6 @@ + (CGFloat)imageCollectionViewHeightWithCount:(NSInteger)countNum{
163159
return (43 *numOfline);
164160
}
165161

166-
167162
#pragma mark Collection M
168163
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
169164
return _curComment.htmlMedia.imageItems.count;

Coding_iOS/Controllers/ReviewCell.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020
@property (strong, nonatomic) IBOutlet UILabel *userState;
2121
@property (strong, nonatomic) User * user;
2222

23-
- (void)configureCellWithHeadIconURL:(NSString *)headIconURL
24-
reviewIconURL:(NSString *)reviewIconURL
25-
userName:(NSString *)userName
26-
userState:(NSString *)userState;
27-
2823
- (void)initCellWithReviewer:(User*)reviewer
2924
likeValue:(NSNumber*)likeValue;
3025
- (void)initCellWithVolunteerReviewers:(User*)reviewer

Coding_iOS/Controllers/ReviewCell.m

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,6 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
2222

2323
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
2424
[super setSelected:selected animated:animated];
25-
26-
// Configure the view for the selected state
27-
}
28-
29-
- (void)configureCellWithHeadIconURL:(NSString *)headIconURL
30-
reviewIconURL:(NSString *)reviewIconURL
31-
userName:(NSString *)uName
32-
userState:(NSString *)uState {
33-
headIconURL = @"/static/fruit_avatar/Fruit-6.png";
34-
[self.headIcon sd_setImageWithURL:[headIconURL urlImageWithCodePathResizeToView:self.headIcon] placeholderImage:kPlaceholderMonkeyRoundView(self.headIcon)];
35-
[self.headIcon doCircleFrame];
36-
self.reviewIcon.image = [UIImage imageNamed:reviewIconURL];
37-
self.userName.text = uName;
38-
self.userState.text = uState;
39-
40-
4125
}
4226

4327
- (void)initCellWithReviewer:(User*)reviewer
@@ -68,8 +52,6 @@ - (void)initCellWithVolunteerReviewers:(User*)reviewer
6852
self.userName.text = reviewer.name;
6953
if([likeValue isEqual:@100]) {
7054
self.userState.text = @"+1";
71-
//[self.reviewIcon setHidden:NO];
72-
//self.reviewIcon.image = [UIImage imageNamed:@"PointLikeHead"];
7355
self.userState.textColor = [UIColor colorWithHexString:@"0x3BBD79"];
7456
}
7557

Coding_iOS/Views/DynamicActivityCell.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ + (CGFloat)cellHeightWithObj:(id)obj
154154
if([tmpProject.action isEqual:@"mergeChanges"]) {
155155
cellHeight += 44;
156156
}
157-
158157
return cellHeight + height;
159158
}
160159
@end

0 commit comments

Comments
 (0)