title: How to determine the cursor position of a UITextField?
body: <p>I have a text field that is always of the format "XX0000000XX", X being a letter, 0 being a number.  I switch keyboards as the user is typing depending on whether they need to enter a number or letter.</p>
  
  <p>This works fine, until the user positions the cursor in the middle of the text field to make an edit.  How do I determine the cursor position within a UITextField?</p>
  
  <p>I know a UITextView has a selectedRange that can be used, but I've read that you can't force a UITextView to be single line entry?  i.e. Disable multiple lines of text.</p>