Show keyboard in contenteditable UIWebView programmatically(以编程方式在 contenteditable UIWebView 中显示键盘)
问题描述
我的 UIWebView 加载一个 contenteditable html 内容.我想让 UIWebView 获得焦点并在 UIWebView 中显示键盘.
My UIWebView loads a contenteditable html content. I want to let the UIWebView get focused and show keyboard in the UIWebView.
我使用 [self.webview becomeFirstResponder]
,但它不起作用.有什么变通的方法吗?
I use [self.webview becomeFirstResponder]
, but it doesn't work. Is there any work around method?
谢谢.
推荐答案
UIwebview 不可编辑,您不能使其成为第一响应者.如果您可以为此目的使用 javascript,请尝试此答案
UIwebview is not editable and you can not make it first responder. Where as you can use javascripts for that purpose , try out this answer
UIWebView 与 contentEditable(html 编辑),第一响应者处理?
这篇关于以编程方式在 contenteditable UIWebView 中显示键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:以编程方式在 contenteditable UIWebView 中显示键盘


- SetOnItemSelectedListener上的微调程序错误 2022-01-01
- 类似于 Mail.app 的 iPad 模态视图控制器? 2022-01-01
- GPS状态的广播接收器? 2022-01-01
- 如何在 iPhone 模拟器中重置 NSUserDefaults 数据? 2022-01-01
- 网上有没有好的 UIScrollView 教程? 2022-01-01
- URL编码Swift iOS 2022-01-01
- 使用自动布局向 UIScrollView 添加动态大小的视图 2022-01-01
- 在 Iphone SDK 的导航栏上添加多个按钮 2022-01-01
- Xcode 7.3 中带有 UILabel 的 UIStackView 2022-01-01
- UITextView 内容插图 2022-01-01