I have implemented UITextViewDelegate in my ViewController,
After setting delegate to my TextView as
self.addressTextView.delegate=self;
Now i can only set the text as,
[self.addressTextView setText:@"Tamil Nadu, India"];
I am unable to edit the text using keybord. After Implementing shouldChangeTextInRange method only i am able to edit the content in UITextView.
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
return YES;
}
I dont know why?? is shouldChangeTextInRange compulsory if we implementing UITextViewDelegate