使用UIBezierPath在ImageView上绘制和擦除 [英] Draw and Erase on ImageView using UIBezierPath

查看:113
本文介绍了使用UIBezierPath在ImageView上绘制和擦除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写此链接的答案代码以创建ImageViewLayer和Imageview。



这是我得到答案的帖子。有关于效果的示例代码。
,与众不同的是将灰色层更改为纸张成像器。



希望它对您有帮助


I write this link's answer code to create ImageViewLayer and Imageview. StackOverflow Link

This link gives me the below result.

It's work fine .But I want ,when user press the original button... and then touches with finger it remove the clear area ang fill with the previous one.

And how to create Undo Functionality for this..If any question regarding this please add your comment..Please help me...

解决方案

how to draw CALayer with line path like simulate eraser effect?

this is the post i get the answer. there is a sample code about the effect. what you are different is change the gray color layer to be the "paper imager"

hope it help you

这篇关于使用UIBezierPath在ImageView上绘制和擦除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆