I have a UITextView in my iPhone app for which I want to be able to toggle the autocorrectionType.
When a user is editing the text view, I want the autocorrectionTy
Here's an easy way to do this for the image export scenario :
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView
{
// Turn spell check on
textView.autocorrectionType = UITextAutocorrectionTypeYes;
return YES;
}
- (BOOL)textViewShouldEndEditing:(UITextView *)textView
{
// Turn spell check off and clean up red squiggles.
textView.autocorrectionType = UITextAutocorrectionTypeNo;
NSString *currentText = textView.text;
textView.text = @"";
textView.text = currentText;
return YES;
}