Swift 3中的刮刮卡效果 [英] Scratch Card effect in Swift 3

查看:61
本文介绍了Swift 3中的刮刮卡效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的应用在Swift 3中实现刮刮卡效果,我找到了一些示例,但它们在Objective C上(显示刮刮卡效果,通过使用刮刮赢示例的帮助

I am trying to implement a Scratch Card effect in Swift 3 for my app, I found some examples but they're on Objective C (show scratch-card effect with the help of using scratch and win example)

本质上,用户在图像上用手指轻扫,并在他们的手指下显示另一幅图像。

In essence user swipes with finger on an image and reveals another image below their finger as they swipe.

有人知道如何在Swift 3中做到这一点吗?非常感谢任何帮助

Any one knows how to do this in Swift 3? Any help greatly appreciated

推荐答案

您可以使用 ScratchCard 库。它具有简单的API,但我不知道它与Swift 3兼容。无论如何,您可以重写它或检查其实现。

You can use ScratchCard library. It has simple API, but I don't know is it Swift 3 compatible. Anyway, you can rewrite it or check its implementation.

这篇关于Swift 3中的刮刮卡效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆