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 中显示键盘
基础教程推荐
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
