2013-10-25 55 views
-2

我有一个应用程序,我需要通过在图像视图上移动手指来清除图像。 我可以通过使用blendmodeClear选项来做到这一点。现在为另一个选项,我必须填写图像视图的清除部分。任何人都可以请指导我如何做。如何通过ios中的uiimageview绘制图像

谢谢。

+1

您是否想要清除您通过blendmodeClear选项所做的清除? –

+0

是的,但是应该以我们正在绘制清除部分的方式进行。就像用手指填充颜色一样。 – pankaj

+0

其实通过清除它的部分变成白色即色彩更少。所以我需要补充那部分。谢谢 – pankaj

回答

0
You can maintain stack using NSMutableArray, and keep the images in them after each edit steps. Pop the image last entered if user press an undo option. 

for eg: 
[image1] --- > red colored 

user edits it and adds green color 

[image2] --- > green color mixed image 
[image1] --- > red colored 

user moves finger and clears a part 

[image3] --- > image with part partly cleared 
[image2] --- > green color mixed image 
[image1] --- > red colored 


now when user press undo, u can just pop the last entered image (in step 2) 
ie. image 2 . (so we get the stage just before the user cleaerd the part of the image 
. 

does this help? or ur requirement is different? 
相关问题