Hi all,
I'm working on Custom UIAlertView, in which I have UIScrollView and in that ScrollView I have UIImage, UITableView, and UITextView and some UIButtons.
When I tap on UITexView and try to write something on UITextView, the Keyboard appears but KEYBOARD IS NOT RESPONDING, I could not write anything.
Then I set UITextView's Text @"My Description..." , and tried to delete it and Delete Key is responding PERFECTLY but All other Alphabets' and Numerics' Keys are not responding.
Code:
.h
<UITextViewDelegate>
.m
myTextView.delegate = self;
myTextView = [[UITextView alloc]initWithFrame:CGRectMake(25, 640, 250, 60)];
myTextView.textColor = [UIColor blackColor];
myTextView.text = @"My Description....";
myTextView.keyboardType = UIKeyboardTypeDefault;
myTextView.returnKeyType = UIReturnKeyDone;
[myScrollView addSubview: myTextView];
I also Implemented the UITExtView's Delegates
Code:
- (BOOL)textViewShouldEndEditing:(UITextView *)textView
{
[textView resignFirstResponder]
return YES;
}
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range
replacementText:(NSString *)text
{
if ([text isEqualToString:@"\n"]) {
[textView resignFirstResponder];
return FALSE;
}
return TRUE;
}
I don't know what is going wrong in here and I need Your Help.
Thanks.