[英]How to move cursor in UITextField (Swift 2.1)
还有其他方法吗?
UITextField conforms to UITextInput. UITextField符合UITextInput。 This means that you can set its selectedTextRange
property ( https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextInput_Protocol/index.html#//apple_ref/occ/intfp/UITextInput/selectedTextRange ). 这意味着您可以设置其selectedTextRange
属性( https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextInput_Protocol/index.html#//apple_ref/occ/intfp/UITextInput/selectedTextRange )。 A range with zero length is the cursor alone. 长度为零的范围仅是光标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.