I have a UITextView and I am trying to insert a popup subview on top of it when something specific has been entered. Pretty much an auto-complete (similar to native iOS autocorrection.
Using the delegate methods, I can find out how many characters the cursor is offset from the beginning. However, how do I find the precise location of the character/cursor? I need to be able to display the popup view at that specific location.
I tried calculating how wide is each character, but I think that this will not be consistent between Retina and non-Retina displays.
Any suggestions?
EDIT
I am not trying to implement a word auto-complete. I want to display a popup view of my own in order to display a tableview there with multiple options.
1 Answer