Getting and Setting Cursor Position of UITextField and UITextView in Swift
问题 I\'ve been experimenting with UITextField and how to work with it\'s cursor position. I\'ve found a number of relation Objective-C answers, as in Getting the cursor position of UITextField in ios Control cursor position in UITextField UITextField get currently edited word But since I am working with Swift, I wanted to learn how to get the current cursor location and also set it in Swift. The answer below is the the result of my experimentation and translation from Objective-C. 回答1: The