I would like to create a button that moves the cursor position in a UITextView one word at a time. From a user perspective, this would be the same as Option-Right Arrow in Mac OS X, which is defined as “go to the word to the right of the insertion point.”
I have found a couple ways to move on character at a time. How would you modify this to move one word at a time?
- (IBAction)rightArrowButtonPressed:(id)sender
{
myTextView.selectedRange = NSMakeRange(myTextView.selectedRange.location + 1, 0);
}
Thanks for any suggestions.
Was able to implement it like this,