ZhouQi
ZhouQi

Reputation: 531

How can I get custom Text View's inputView?

I use EGOTextView to show some Attributed string like emotion (not emoji), because system's UITextView or UITextField can not show image with text.

But I cannot get the inputView with EGOTextView, How can I get it? Thanks.

Upvotes: 0

Views: 687

Answers (2)

rob mayoff
rob mayoff

Reputation: 385650

The inputView property is defined as read-only in UIResponder, which is a superclass of EGOTextView. So you just need a way to make your instance of EGOTextView return something non-nil from inputView.

Make a subclass of EGOTextView that declares and implements a readwrite version of the inputView property, and use your subclass.

Upvotes: 1

danypata
danypata

Reputation: 10175

If you had checked the implementation of EGOTextView you had find that this class is not a subclass of UITextView1 orUITextFieldso it doesn't haveinputView`.

Upvotes: 0

Related Questions