Reputation: 604
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?
Upvotes: 0
Views: 852
Reputation: 9902
Never call UIKit methods on threads other than the main thread. If it works, that's just luck.
And please, next time you ask a question, do provide more detail in your actual questions, so people won't have to go through the comments to find the actual issue.
Upvotes: 1