From 25b6a69d02e315d74ed1890f43aded48fee66fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Fri, 18 Jun 2021 13:48:44 +0800 Subject: [PATCH] fix: markedTextRange overlap with placeholder while inputing --- doric-iOS/Pod/Classes/Shader/DoricInputNode.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doric-iOS/Pod/Classes/Shader/DoricInputNode.m b/doric-iOS/Pod/Classes/Shader/DoricInputNode.m index 2ed6631f..0964840e 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricInputNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricInputNode.m @@ -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) {