Frage

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?

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top