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 中显示键盘


基础教程推荐
- 如何使 UINavigationBar 背景透明? 2022-01-01
- Android ViewPager:在 ViewPager 中更新屏幕外但缓存的片段 2022-01-01
- LocationClient 与 LocationManager 2022-01-01
- Android文本颜色不会改变颜色 2022-01-01
- :hover 状态不会在 iOS 上结束 2022-01-01
- “让"到底是怎么回事?关键字在 Swift 中的作用? 2022-01-01
- 如何使用 YouTube API V3? 2022-01-01
- 固定小数的Android Money Input 2022-01-01
- 在 iOS 上默认是 char 签名还是 unsigned? 2022-01-01
- 使用 Ryzen 处理器同时运行 WSL2 和 Android Studio 2022-01-01