Pergunta

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?

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top