Reputation: 11747
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
Reputation: 53
i was going to suggest Core Animation as well https://developer.apple.com/library/Mac/DOCUMENTATION/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html
Upvotes: 1
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