سؤال

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?

هل كانت مفيدة؟

المحلول

Not possible to do unfortunately, need to subclass UITextView and override insertText and deleteBackward.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top