Andres
Andres

Reputation: 11747

Make UIImageView transparent and show UIImageView that is below it while touching

I have a requirement where I have a UIImageView on top of the other. I need to make the one on the top transparent while the user "draws" on it. Really instead of drawing what the user would be doing is "erasing" the top view letting the one below to be shown.

I been googling for a while and couldn't find a way of doing this. Where should I start reading?

My idea was subclassing UIVIew and in touchesBegan, touchesMoved and touchesEnded handle the "erasing", but I have no idea how to erase!

Any clue so I can start reading documentation??

Thanks a lot!

Upvotes: 0

Views: 73

Answers (2)

Matteo Gobbi
Matteo Gobbi

Reputation: 17687

You are using a no valid way to do what you want to do. To draw (and erase) you should use the CoreGraphics and Quartz2D Apple frameworks.

Here the Apple references to Quartz2D

especially the Path chapter.

Upvotes: 1

Related Questions