質問

I want to use GCPlaceholderTextView .

When I make IBOutlet UIPlaceHolderTextView model, I can't connect uitextview on storyboard. I have an error -

[UITextView setPlaceholder:]: unrecognized selector sent to instance.

How can I connect uitextview with GCPlaceholderTextView? Does anyone know?

役に立ちましたか?

解決

You need to redeclare the class of your UITextView in your Storyboard and put GCPlaceholderTextView.

Otherwise the object initialized is a UITextView and not a GCPlaceholderTextView like you want. So it doesn't have the method setPlaceholder:

Like this :

Change class of UITextView

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top