【问题标题】:Make UIImageView transparent and show UIImageView that is below it while touching使 UIImageView 透明并在触摸时显示其下方的 UIImageView
【发布时间】:2014-06-08 21:06:33
【问题描述】:

我有一个要求,我有一个 UIImageView 在另一个之上。当用户“绘制”它时,我需要使顶部的那个透明。实际上,不是绘制用户将要执行的操作,而是“擦除”顶视图,让下面的视图显示出来。

我在谷歌上搜索了一段时间,但找不到这样做的方法。我应该从哪里开始阅读?

我的想法是继承UIVIew 并在touchesBegantouchesMovedtouchesEnded 中处理“擦除”,但我不知道如何擦除!

有什么线索可以让我开始阅读文档吗??

非常感谢!

【问题讨论】:

    标签: ios objective-c uiview core-graphics


    【解决方案1】:

    您正在使用无效的方法来做您想做的事情。 要绘制(和擦除)您应该使用CoreGraphicsQuartz2D Apple 框架

    Here the Apple references to Quartz2D

    尤其是Path chapter

    【讨论】:

      【解决方案2】:
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-08
      • 1970-01-01
      • 2023-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多