Not possible to do unfortunately, need to subclass UITextView and override insertText
and deleteBackward
.
Is there a way to override UITextView UIKeyInput so can enter text from superview?
-
09-07-2023 - |
Question
I have a view TextViewHolder
that has a UITextView
as a subview. I'd like for TextViewHolder
to implement UIKeyInput
and it's three accompanying methods insertText
, hasText
, and deleteBackwards
so that I can insert the text in my UITextView
from TextViewHolder
(for messy design purposes) and I'd also like to maintain the functionality of an editable UITextView
(ala positioning of the cursor, copy paste, ability to add different languages). Is it possible to accomplish this without subclassing the UITextView?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow