How to set cursor position for UITextView on user input?
cocoa-touch, iphone, objective-c, uitextview, xcode
Solution
So I ended up adding a UILabel over the `UITextView` which acts as a placeholder for the textView. Tapping on the UILabel would send the action down to the textView and `becomeFirstResponder`. Once you start typing, make the label hidden.
Problem
I am looking for a simple answer for this problem... I have a `UITextView` in which the user can start typing and click on DONE and resign the keyboard. When the wants to edit it again, I want the cursor (the blinking line) to be at the first position of the `textView`, not at the end of textView. (act like a placeholder) I tried `setSelectedRange` with `NSMakeRange(0,0)` on `textViewDidBeginEditing`, but it does not work. More Info: It can be seen that.. when the user taps on the `textView` the `cursor` comes up at the position where the user taps on the `textView`. I want it to always blink at starting position when `textViewDidBeginEditing`.