I want to turn auto-correction on/off based on the content in the text field.
For example, if the user is typing a phrase like "Machine tools" I want auto-correction to be on (for the rest of the words she's gonna type) but if I sense the beginnings of - say - a web address like "www.mach.." I want to turn auto-correction off.
I tried doing this on receiving the UITextFieldTextDidChangeNotification, by toggling autoCorrectionType on the textfield based on the content typed. While the actual value of this property on the text field changes (verified this with an NSLog) the actual correction behaviour does not get affected. So if auto-correction was on at the beginning of the editing session, it continues to be so even AFTER I have set the text field to UITextAutoCorrectionTypeNo. So "www.foogle..." gets corrected to "www.google.." which may not always be desirable in my book.
So has anyone found a way to enable/disable auto-correction on the fly (when editing) in a text field?
Thanks.