Skip to content

Commit 4ee5cd4

Browse files
committed
冒泡图 & 讨论 & 输入框
1 parent 9b1283d commit 4ee5cd4

9 files changed

+10
-5
lines changed

Coding_iOS/Coding_iOS-Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</dict>
3737
</array>
3838
<key>CFBundleVersion</key>
39-
<string>4.0.201609231900</string>
39+
<string>4.0.201609242300</string>
4040
<key>ITSAppUsesNonExemptEncryption</key>
4141
<false/>
4242
<key>LSApplicationQueriesSchemes</key>
-116 Bytes
Loading
-286 Bytes
Loading
-150 Bytes
Loading
-319 Bytes
Loading
-166 Bytes
Loading
-258 Bytes
Loading

Coding_iOS/Views/Cell/TopicCommentCell.m

+8-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@interface TopicCommentCell ()<UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout>
2020
@property (strong, nonatomic) UIImageView *ownerIconView;
2121
@property (strong, nonatomic) UIView *bestAnswerV;
22-
@property (strong, nonatomic) UIButton *voteBtn;
22+
@property (strong, nonatomic) UIButton *voteBtn, *voteBtnBig;
2323
@property (strong, nonatomic) UILabel *timeLabel;
2424
@property (strong, nonatomic) UICustomCollectionView *imageCollectionView;
2525
@end
@@ -64,6 +64,10 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
6464
_voteBtn.titleLabel.font = [UIFont systemFontOfSize:11];
6565
[_voteBtn addTarget:self action:@selector(voteBtnClicked) forControlEvents:UIControlEventTouchUpInside];
6666
[self.contentView addSubview:_voteBtn];
67+
68+
_voteBtnBig = [[UIButton alloc] initWithFrame:CGRectInset(_voteBtn.frame, -10, -5)];
69+
[_voteBtnBig addTarget:self action:@selector(voteBtnClicked) forControlEvents:UIControlEventTouchUpInside];
70+
[self.contentView insertSubview:_voteBtnBig belowSubview:_voteBtn];
6771
}
6872
CGFloat curWidth = kScreen_Width - 40 - 2*kPaddingLeftWidth;
6973
if (!_contentLabel) {
@@ -109,7 +113,7 @@ - (void)voteBtnClicked{
109113
}
110114

111115
- (void)setVoteCount:(NSNumber *)voteCount isVoted:(BOOL)isVoted{
112-
[_voteBtn setBackgroundColor:[UIColor colorWithHexString:isVoted? @"0x2FAEEA": @"0xFFFFFF"]];
116+
[_voteBtn setBackgroundColor:[UIColor colorWithHexString:isVoted? @"0x3BBD79": @"0xFFFFFF"]];
113117
[_voteBtn setTitleColor:[UIColor colorWithHexString:isVoted? @"0xFFFFFF": @"0x666666"] forState:UIControlStateNormal];
114118
[_voteBtn setTitle:[NSString stringWithFormat:@"+%@", voteCount] forState:UIControlStateNormal];
115119
}
@@ -130,6 +134,7 @@ - (void)setToComment:(ProjectTopic *)toComment{
130134

131135
_ownerIconView.y = _contentLabel.y = curBottomY;
132136
_voteBtn.y = _ownerIconView.bottom + 5;
137+
_voteBtnBig.y = _voteBtn.y - 5;
133138
[self setVoteCount:_toComment.up_vote_counts isVoted:_toComment.is_up_voted.boolValue];
134139
[_ownerIconView sd_setImageWithURL:[_toComment.owner.avatar urlImageWithCodePathResizeToView:_ownerIconView] placeholderImage:kPlaceholderMonkeyRoundView(_ownerIconView)];
135140
[_contentLabel setLongString:_toComment.content withFitWidth:curWidth];
@@ -158,7 +163,7 @@ - (void)setToComment:(ProjectTopic *)toComment{
158163

159164
- (void)setIsAnswer:(BOOL)isAnswer{
160165
_isAnswer = isAnswer;
161-
_ownerIconView.hidden = _voteBtn.hidden = !_isAnswer;
166+
_ownerIconView.hidden = _voteBtn.hidden = _voteBtnBig.hidden = !_isAnswer;
162167
_contentLabel.textColor = [UIColor colorWithHexString:_isAnswer? @"0x222222": @"0x666666"];
163168
}
164169

Coding_iOS/Views/UIMessageInputView/UIMessageInputView_Add.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ - (id)initWithFrame:(CGRect)frame
2424
}
2525

2626
- (UIButton *)buttonWithImageName:(NSString *)imageName title:(NSString *)title index:(NSInteger)index{
27-
CGFloat itemWidth = (kScreen_Width- 2*kPaddingLeftWidth)/3;
27+
CGFloat itemWidth = (kScreen_Width- 2*kPaddingLeftWidth)/4;
2828
CGFloat itemHeight = 90;
2929
CGFloat iconWidth = 57;
3030
CGFloat leftX = kPaddingLeftWidth, topY = 10;

0 commit comments

Comments
 (0)