setKeyboardAppearance for UIWebView

后端 未结 3 1194
挽巷
挽巷 2021-01-23 07:47

It is well know that the keyboard appearance of UITextView and UITextField can be set as following :

[self.textField setKeyboardAppeara         


        
相关标签:
3条回答
  • 2021-01-23 08:20

    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.

    0 讨论(0)
  • 2021-01-23 08:20

    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

    0 讨论(0)
  • 2021-01-23 08:31

    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

    0 讨论(0)
提交回复
热议问题