Show photo with SCRATCH OUT EFFECT by finger

天大地大妈咪最大 提交于 2019-12-24 12:34:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!