Show keyboard in contenteditable UIWebView programmatically

前端 未结 4 971
盖世英雄少女心
盖世英雄少女心 2020-12-30 15:29

My UIWebView loads a contenteditable html content. I want to let the UIWebView get focused and show keyboard in the UIWebView.

I use [self.webview becomeFirstR

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-30 16:05

    This is now possible in iOS 6. See the boolean keyboardDisplayRequiresUserAction in UIWebView. Once set to NO then you can use focus() to set the cursor.

提交回复
热议问题