问题
It is well know that the keyboard appearance of UITextView and UITextField can be set as following :
[self.textField setKeyboardAppearance:UIKeyboardAppearanceAlert];
But how could we set the keyboard appearance of a UIWebView?
Actually, here im using ckeditor for HMTL editing.
回答1:
Unfortunately, you can not set the keyboard appearance for a UIWebView using Apple's UIKit APIs.
You can however specify the input type using html tags like so:
<input type="text" size="30" autocorrect="off" autocapitalization="on">
And here are the other parameters.
Text: <input type="text"></input>
Telephone: <input type="tel"></input>
URL: <input type="url"></input>
Email: <input type="email"></input>
Zip code: <input type="text" pattern="[0-9]*"></input>
More info in the Apple docs:
Text, Web, and Editing Programming Guide for iOS
回答2:
I dont think you can set it for a UIWebview. UITextView and UITextField can become first responder but a UIWebView can not be first responder. So there are no property called keyboardAppearance for UIWebview. Its just that its elements inside UIWebview can bring keyboard to show up and not the UIWebview.
回答3:
using any web page to load web view in xcode,it have default keyboard,thh key board contains done, next&previous buttons,next&previous used to move textfields
来源:https://stackoverflow.com/questions/13132446/setkeyboardappearance-for-uiwebview