Created
April 9, 2012 02:38
-
-
Save setoh2000/2340962 to your computer and use it in GitHub Desktop.
UITextFieldのカーソルを先頭に移動する方法 (Moving the cursor to the beginning of UITextField)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UITextPosition *newPos = [textField positionFromPosition:textField.beginningOfDocument offset:0]; | |
textField.selectedTextRange = [textField textRangeFromPosition:newPos toPosition:newPos]; | |
[textField setNeedsLayout]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment