How to draw over text, or highlight/underline something in a UIWebView?
I need to develop an application like an eBook reader, that loads PDF or HTML files. This part is easy. The part where I'd like some reference or example is the feature that allows the user to highlight/underline text with the finger, or draw circles or ellipses around the text. So you activate the "pencil" or another drawing tool, and "draw" over th开发者_如何学运维e text, to highlight some parts.
Is there any example around?
The best option here is to create a transparent context in a CGLayer in Quartz and do your drawings, then copy the result back as an image and put it over the text view. See this for references about Quartz.
精彩评论