将中文手写键盘插入应用程序视图

发布于 2024-11-16 01:43:26 字数 103 浏览 7 评论 0原文

我想将中文手写键盘嵌入到我的应用程序的视图中。也就是说,我不希望它连接到真正的键盘。事实上,我什至不希望它对用户可见。我希望用户能够在空白屏幕的中央手写,并在完成后在屏幕上输出汉字。这可能吗?

i would like to sort of embed the chinese handwriting keyboard into a view in my app. That is to say, i don't want it connected to the real keyboard. In fact, I don't even want it visible to the user. I'd like the user to simply be able to handwrite in the center of a blank screen, and have a chinese character output on the screen after completion. is this even possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

毁虫ゝ 2024-11-23 01:43:26

支持手写的唯一方法是编写一个永远不会成为firstResponder的视图(防止键盘出现),userInteractionEnabled = YES(获取触摸),并使用touchesMoved在用户移动手指时绘制字符。

您可以通过从 UITextView 和类似的文本输入视图。

The only way you could support handwriting would be to write a view which never became firstResponder (preventing the keyboard from appearing), userInteractionEnabled=YES (to get touches), and uses the touchesMoved to draw the characters as the user moves their finger.

You can implement a custom keyboard by returning a custom keyboard UIView from the inputView property on UITextView and similar text input views.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文