fix: markedTextRange overlap with placeholder while inputing

This commit is contained in:
王劲鹏 2021-06-18 13:48:44 +08:00 committed by osborn
parent 48d6a84394
commit 25b6a69d02

View File

@ -307,6 +307,12 @@ - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range r
}
- (void)textViewDidChange:(UITextView *)textView {
if (textView.markedTextRange || textView.text.length > 0) {
self.view.placeholderLabel.hidden = YES;
} else {
self.view.placeholderLabel.hidden = NO;
}
if (textView.markedTextRange) return;
if (self.maxLength) {