i have implement a view confroming UITextInput protocol,(my view is not a class of UITextview or UITextfield)
and how can i get the cursor's position to comunicate with the keyboard?
thanks , guys~
i have implement a view confroming UITextInput protocol,(my view is not a class of UITextview or UITextfield)
and how can i get the cursor's position to comunicate with the keyboard?
thanks , guys~
I recommend you check out A Guided Tour of a UITextInput Implementation from the docs. There is sample code which shows how to do this: in -setSelectedTextRange:
you can update the cursor position using the selected text range.