My post from 2015 (Finding the Location of the Cursor in UITextView, UITextField), works great in objective C. However, here’s the UITextView methodology for Swift 3.0.