Skip to content

Commit b490ac0

Browse files
committed
页面调整
1 parent 177b94c commit b490ac0

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

Coding_iOS/Views/Cell/ProjectTopicCell.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
3636
self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
3737
self.backgroundColor = [UIColor clearColor];
3838
if (!_userIconView) {
39-
_userIconView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 33, 33)];
39+
_userIconView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 12, 33, 33)];
4040
[_userIconView doCircleFrame];
4141
[self.contentView addSubview:_userIconView];
4242
}
4343
if (!_titleLabel) {
44-
_titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kProjectTopicCell_PadingLeft, 10, kProjectTopicCell_ContentWidth, 20)];
44+
_titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kProjectTopicCell_PadingLeft, 12, kProjectTopicCell_ContentWidth, 20)];
4545
_titleLabel.font = kProjectTopicCell_ContentFont;
4646
_titleLabel.textColor = [UIColor colorWithHexString:@"0x222222"];
4747
[self.contentView addSubview:_titleLabel];
@@ -95,7 +95,7 @@ - (void)layoutSubviews{
9595
[_userIconView sd_setImageWithURL:[_curTopic.owner.avatar urlImageWithCodePathResizeToView:_userIconView] placeholderImage:kPlaceholderMonkeyRoundView(_userIconView)];
9696
[_titleLabel setLongString:_curTopic.title withFitWidth:kProjectTopicCell_ContentWidth maxHeight:kProjectTopicCell_ContentHeightMax];
9797

98-
CGFloat curBottomY = 10 + [_curTopic.title getHeightWithFont:kProjectTopicCell_ContentFont constrainedToSize:CGSizeMake(kProjectTopicCell_ContentWidth, kProjectTopicCell_ContentHeightMax)] + 10;
98+
CGFloat curBottomY = 12 + [_curTopic.title getHeightWithFont:kProjectTopicCell_ContentFont constrainedToSize:CGSizeMake(kProjectTopicCell_ContentWidth, kProjectTopicCell_ContentHeightMax)] + 12;
9999
CGFloat curRightX = kProjectTopicCell_PadingLeft;
100100

101101
_tagsView.tags = _curTopic.labels;
@@ -124,9 +124,9 @@ +(CGFloat)cellHeightWithObj:(id)aObj{
124124
CGFloat cellHeight = 0;
125125
if ([aObj isKindOfClass:[ProjectTopic class]]) {
126126
ProjectTopic *curTopic = (ProjectTopic *)aObj;
127-
cellHeight += 10 + [curTopic.title getHeightWithFont:kProjectTopicCell_ContentFont constrainedToSize:CGSizeMake(kProjectTopicCell_ContentWidth, kProjectTopicCell_ContentHeightMax)] + 10;
127+
cellHeight += 12 + [curTopic.title getHeightWithFont:kProjectTopicCell_ContentFont constrainedToSize:CGSizeMake(kProjectTopicCell_ContentWidth, kProjectTopicCell_ContentHeightMax)] + 12;
128128
cellHeight += [ProjectTopicCellTagsView getHeightForTags:curTopic.labels];
129-
cellHeight += 15+5;
129+
cellHeight += 15 + 12;
130130
}
131131
return cellHeight;
132132
}
@@ -175,7 +175,7 @@ + (CGFloat)getHeightForTags:(NSArray *)tags{
175175
}
176176
}
177177
height = curY + kProjectTopicCellTagsView_Height_PerLine;
178-
height += 10.0;//与下面内容的间隔
178+
height += 7.0;//与下面内容的间隔
179179
}else{
180180
height = 0.0;
181181
}

Coding_iOS/Views/ProjectTagsView.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ - (void)p_refreshAddButtonHasTags:(BOOL)hasTags{
166166
CGFloat textWidth = [buttonTitle getWidthWithFont:kProjectTagsViewLabel_Font constrainedToSize:CGSizeMake(CGFLOAT_MAX, kProjectTagsViewLabel_Height_Content)];
167167
[_addTagButton setTitle:buttonTitle forState:UIControlStateNormal];
168168
[_addTagButton setImage:nil forState:UIControlStateNormal];
169+
[_addTagButton setTitleEdgeInsets:UIEdgeInsetsZero];
169170
[_addTagButton setSize:CGSizeMake(textWidth + kProjectTagsViewLabel_Padding_Content, kProjectTagsViewLabel_Height_Content)];
170171
}else{
171172
_addTagButton.layer.borderWidth = 0.f;
@@ -177,6 +178,7 @@ - (void)p_refreshAddButtonHasTags:(BOOL)hasTags{
177178
[_addTagButton setSize:CGSizeMake(kScreen_Width - 2*kPaddingLeftWidth, kProjectTagsView_Height_PerLine)];
178179
[_addTagButton setTitle:buttonTitle forState:UIControlStateNormal];
179180
[_addTagButton setImage:[UIImage imageNamed:@"project_tag_btn"] forState:UIControlStateNormal];
181+
[_addTagButton setTitleEdgeInsets:UIEdgeInsetsMake(0, 5, 0, -5)];
180182
}
181183
}
182184

0 commit comments

Comments
 (0)