views:

42

answers:

1

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 the text, to highlight some parts.

Is there any example around?

A: 

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.

Digital Robot
I was thinking the same, but I was looking for a somehow complete example. I know, I'm looking for the easy way, but this sounds like a typical feature for iPad reading apps, and I suppose someone has already shared it :)
devguy
I am not aware of someone sharing this kind of stuff. It is not a typical feature. You will have to implement yourself. Quartz is not difficult. Once you have learned the concepts that are easy you learn everything. trust me.
Digital Robot