File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ - (void)viewDidLoad
73
73
74
74
// 评论
75
75
__weak typeof (self) weakSelf = self;
76
- _myMsgInputView = [UIMessageInputView messageInputViewWithType: UIMessageInputViewContentTypeTopic];
76
+ _myMsgInputView = [UIMessageInputView messageInputViewWithType: UIMessageInputViewContentTypeTopic placeHolder: @" 撰写答案 " ];
77
77
_myMsgInputView.isAlwaysShow = YES ;
78
78
_myMsgInputView.delegate = self;
79
79
@@ -632,7 +632,7 @@ - (instancetype)init
632
632
- (void )setCurTopic : (ProjectTopic *)curTopic {
633
633
_curTopic = curTopic;
634
634
635
- _commentL.text = [NSString stringWithFormat: @" %d 条评论 " , _curTopic.child_count.intValue];
635
+ _commentL.text = [NSString stringWithFormat: @" %d 条回答 " , _curTopic.child_count.intValue];
636
636
637
637
BOOL hasWatchers = _curTopic.watchers .count > 0 ;
638
638
_tipL.hidden = hasWatchers;
Original file line number Diff line number Diff line change @@ -126,8 +126,8 @@ - (void)setInputState:(UIMessageInputViewState)inputState{
126
126
}
127
127
}
128
128
- (void )setPlaceHolder : (NSString *)placeHolder {
129
+ _placeHolder = placeHolder;
129
130
if (_inputTextView && ![_inputTextView.placeholder isEqualToString: placeHolder]) {
130
- _placeHolder = placeHolder;
131
131
_inputTextView.placeholder = placeHolder;
132
132
}
133
133
}
@@ -268,10 +268,11 @@ - (void)setToUser:(User *)toUser{
268
268
_toUser = toUser;
269
269
NSString *inputStr = [self inputStr ];
270
270
if (_inputTextView) {
271
+
271
272
if (_contentType != UIMessageInputViewContentTypePriMsg) {
272
- self. placeHolder = _toUser? [NSString stringWithFormat: @" 回复 %@ " , _toUser.name]: @" 撰写评论 " ;
273
+ _inputTextView. placeholder = _toUser? [NSString stringWithFormat: @" 回复 %@ " , _toUser.name]: _placeHolder ;
273
274
}else {
274
- self.placeHolder = @" 请输入私信内容 " ;
275
+ self.placeHolder = _placeHolder ;
275
276
}
276
277
_inputTextView.selectedRange = NSMakeRange (0 , _inputTextView.text .length );
277
278
[_inputTextView insertText: inputStr? inputStr: @" " ];
@@ -361,7 +362,7 @@ + (instancetype)messageInputViewWithType:(UIMessageInputViewContentType)type pla
361
362
if (placeHolder) {
362
363
messageInputView.placeHolder = placeHolder;
363
364
}else {
364
- messageInputView.placeHolder = @" 说点什么吧... " ;
365
+ messageInputView.placeHolder = @" 撰写评论 " ;
365
366
}
366
367
return messageInputView;
367
368
}
You can’t perform that action at this time.
0 commit comments