【问题标题】:How to draw a image over the uiimageview in ios如何在ios中的uiimageview上绘制图像
【发布时间】:2013-10-25 09:36:50
【问题描述】:

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

谢谢。

【问题讨论】:

  • 您要撤消您通过 blendmodeClear 选项执行的清除操作吗?
  • 是的,但这应该是我们绘制已清除部分的方式。就像用手指填充颜色一样。
  • 实际上通过清除它,该部分变为白色,即颜色减少。所以我需要补充那部分。谢谢

标签: iphone ios6 uiimageview


【解决方案1】:
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?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-21
    • 1970-01-01
    • 2014-05-13
    • 1970-01-01
    相关资源
    最近更新 更多