On iOS6 this cod works (myTextView is an instance variable):
myTextView = [[UITextView alloc] initWithFrame:CGRectMake(10, 10, 10, 10)];
myTextView.keyboardType = UIKeyboardTypeDefault;
[self addSubview:myTextView];
And on iOS5 it crashes on line:
[myTextView becomeFirstResponder];
But the strangest thing it that situation is: if i set keyboardType
to UIKeyboardTypeEmail
- no crashes!
Any ideas?