-2

我有一个应用程序,我需要通过在图像视图上移动手指来清除图像。我可以通过使用 blendmodeClear 选项来做到这一点。现在对于另一个选项,我必须填充图像视图的那些已清除部分。谁能指导我怎么做。

谢谢。

4

1 回答 1

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?
于 2013-10-25T10:53:45.900 回答