سؤال

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