I saw this answer of how to create a placeholder for UITextView.
I took the following steps:
Add to the .h class the declaration:
@interface AdjustPhotoViewController : UIViewController<UITextViewDelegate>
Added the method:
- (BOOL) textViewShouldBeginEditing:(UITextView *)textView { NSLog(@"%d",[textView tag]); if ([textView tag]==1){ campaignTitle.text = @""; }else{ campaignDescription.text = @""; } return YES; }
But I don't see that the method is being invoked!
What am I missing?
textView is already delegated via the storyboard to the view
SOLVED:
The problem was that it wasn't delegated. Although I was using storyboard - it was only an outlet, not a delegate. Remember that if you are using storyboard, you need to delegate also from the text view to the orange button of the view! not only the other way