I'm trying to find and delete the selected text in a text field, but it SIGABRTs every time. I keep getting an NSInvalidArgumentException when I try to retrieve the selectedTextRange. In fact I tested it and every function having to do with the selected text seems to break the app.
[mTextField selectedTextRange];
Even that line of code itself is an unrecognized selector for some reason. I've double checked that I'm not using garbage data or anything, I'm able to get the text first and then getting the selected text afterwards breaks it.
selectedTextRange
can only use on iOS5+.