如何在ios中的uiimageview上绘制图像

时间:2013-10-25 09:36:50

标签: iphone ios6 uiimageview

我有一个应用程序,我需要通过在图像视图上移动手指来清除图像。 我可以使用blendmodeClear选项来完成此操作。现在换另一个选项,我必须填写图像视图的清除部分。任何人都可以指导我该怎么做。

感谢。

1 个答案:

答案 0 :(得分: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?