On a UIViewController I have placed an editable UITextView with some text to be displayed while loading say “Some comment”. My requirement is that when I click inside the text view, the pre-defined text should get cleared i.e. the text view should be blank and should no more show “Some Comment” text on it.
I used textViewDidBeginEditing as follows, but is not hitting the method itself:
- (void)textViewDidBeginEditing:(UITextView *)textView
{
textView.text = @"";
}
Do I need to raise any events for this or I need to define anything else for making the program to hit that method when the user clicks inside the text view.
Thanks!!
Set the delegate for the UITextView inside the .Xib File by connecting it to the File’s Owner.