问题
I need your help to know how to create an iPhone application to show a photo with SCRATCH OUT EFFECT.
Something like the effect in this flash tutorial http://www.tutorial5.com/content/view/115/46/
Please help. Thanks.
回答1:
You can have a look at the following post on how to create a blurred image effect, I don't think it's the best & fasted method, but it might get you started:
UIImage blur
回答2:
You can implement the scratch out effect by using CoreGraphics.
Subclass UIView for the scratchable image. Draw the scratchable image, use a mask to cut out the parts of the image that gets "scratched".
Each time the user scratches the image, make it so the mask and the image gets updated.
Full code example on github
来源:https://stackoverflow.com/questions/3880219/show-photo-with-scratch-out-effect-by-finger