在iOS应用中捕获签名 [英] Capturing signatures in an iOS app
问题描述
我们需要从iOS应用程序捕获签名,用例是让用户直接用手指在屏幕上绘制签名。我更多是一个网络家伙,所以我的默认方法是嵌入一个网络视图,并使用画布让用户绘制,然后捕获一个PNG与 toDataURL
。一个本地的Cocoa控件可能会更好。有没有任何预建的解决方案,或者一个简单的API使用?我注意到iOS上的汉字输入可以让你在手机上绘制字符:这个API可以使用还是私有?
We have a need to capture signatures from an iOS app – the use case is letting the user draw their signature with their finger directly onto the screen. I’m more of a web guy so my default approach would be to embed a web view and use canvas to let the user draw, then capturing a PNG with toDataURL
. A native Cocoa control would probably be nicer though. Are there any pre-built solutions out there, or an easy API to use? I note that the kanji input on iOS lets you draw characters on your phone: is this API available for use or is it private?
推荐答案
p>你可以使用Core Graphics。这是教程。
You can do that using Core Graphics. Here is a tutorial.
这篇关于在iOS应用中捕获签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!