Is there a way to find out the current cursor position within a UITexField?
I'm stumped! I created a custom input view for an ordinary UITextField. My input view has about 15 buttons that replaces the standard keyboard input. The thing is if the user tries to move the cursor within the field to insert/delete a char, I need to find out the current cursor position within the text field so that a character can get inserted to that correct position. Same is true when the user taps the equivalent of Erase button, the character should be removed at the current cursor position.
I read about the UITextInput Protocol but it's too complicated for my simple needs. However, I would be willing to go through all the trouble of customizing a keyboard interface but there is no sample code. I have to use a custom input view since there are specific valid chars for input. The custom view should behave like a typical keyboard, with insert and erase at cursor position.
Would really, really appreciate the help on this. Thanks so much!!
|