Skip to content

Commit e07b534

Browse files
committed
UIPlaceHolderTextView(改出来的bug)
1 parent 463ae5b commit e07b534

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Coding_iOS/Controllers/TopicDetailViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ - (void)refreshTopic{
177177
weakSelf.curTopic = data;
178178

179179
weakSelf.myMsgInputView.curProject = weakSelf.curTopic.project;
180-
weakSelf.myMsgInputView.commentOfId = _curTopic.id;
180+
weakSelf.myMsgInputView.commentOfId = weakSelf.curTopic.id;
181181
weakSelf.myMsgInputView.toUser = nil;
182182
[weakSelf configNavBtn];
183183

Coding_iOS/Util/Common/UIPlaceHolderTextView.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ - (void)drawRect:(CGRect)rect
8989
if (_placeHolderLabel == nil )
9090
{
9191

92-
_placeHolderLabel = [[UILabel alloc] initWithFrame:CGRectMake(insets.left+5,insets.top,self.bounds.size.width - (insets.left +insets.right+10),0)];
92+
_placeHolderLabel = [[UILabel alloc] initWithFrame:CGRectMake(insets.left+5,insets.top,self.bounds.size.width - (insets.left +insets.right+10),1.0)];
9393
_placeHolderLabel.lineBreakMode = NSLineBreakByWordWrapping;
9494
_placeHolderLabel.numberOfLines = 0;
9595
_placeHolderLabel.font = self.font;
@@ -101,7 +101,7 @@ - (void)drawRect:(CGRect)rect
101101
}
102102
_placeHolderLabel.text = self.placeholder;
103103
[_placeHolderLabel sizeToFit];
104-
_placeHolderLabel = [[UILabel alloc] initWithFrame:CGRectMake(insets.left+5,insets.top,self.bounds.size.width - (insets.left +insets.right+10),CGRectGetHeight(_placeHolderLabel.frame))];
104+
[_placeHolderLabel setFrame:CGRectMake(insets.left+5,insets.top,self.bounds.size.width - (insets.left +insets.right+10),CGRectGetHeight(_placeHolderLabel.frame))];
105105
[self sendSubviewToBack:_placeHolderLabel];
106106
}
107107

0 commit comments

Comments
 (0)