适用于 ipad 的 uiwebview 的自定义键盘
我正在开发一个在 UIWebView
中运行的 iPad 应用程序,并且我想使用仅包含数字 (0-9) 的自定义键盘,例如 iPhone 数字键盘,用于某些输入字段。
请提供任何建议或代码示例。
I am working on an iPad app which works in UIWebView
, and I want to use a custom keyboard that contains only numbers (0-9) like iPhone numpad for some of the input fields.
Any suggestions or code sample please.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过设置 input 标签中的属性来使 UIWebView 显示数字键盘。
You can make the UIWebView display the number pad keyboard by setting the attribute in the input tag.
Apple 已经提供了可供您使用的数字键盘。
您可以使用以下方式以编程方式设置它:
您还可以通过 Interface Builder 设置它。
Apple already has a numeric keyboard that you can use.
You can programmatically set it using:
You can also set it through the Interface Builder.