I would like to implement the Medium iOS App like effect for tapping highlight and shows tooltip.
I have been researching on Text Kit
and some other stackoverflow questions have some thoughts on it, please also suggest what's the better alternative to this.
Scenario:
- Static Text pre-defined
- Shows highlights in several words or phrases
Solution thoughts:
- Use
UITextView
for storing text - Use attributed string for text content
- Showing background color using
NSBackgroundColorAttributedName
- Detect the selection by
layoutManager.characterIndexForPoint(...)
- Shows tooltip next to the selection
- Shows tooltip using one of these pods
AMPopTip
,CMPopTipView
,EasyTipView
Right now, I am not able to select the word and shows the tooltip just next to it. Any tier of help is appreciated.