开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜