答案 0 :(得分:4)
键盘类型只设置要显示的键盘。
内容类型更为通用。
UITextField实现UITextInputTraits协议。在此,内容类型用于指示文本字段的语义含义。例如,它可用于指示可能发生的各种自动更正。
有关此协议的详细信息,请参阅https://developer.apple.com/documentation/uikit/uitextinputtraits。
答案 1 :(得分:1)
根据文件:
另一方面,textContentType属性用于为键盘提供有关文本文档语义意图的额外信息。
他们 Dim strPosUrl As String, strUsername As String, strPassword As String, _
strStoreDomId As String, strStore As String, _
strBtnStoreUpdateDomId As String, strOrder As String, _
strLoadingSpinner As String, strCssAttributeSpinner As String, _
strCssTextSpinner As String
Dim objBrowser As Object 'SHDocVw.InternetExplorer
Dim blnSsoLogin As Boolean
Dim intStoreColNum As Integer, intOrderColNum As Integer, _
intCreditCardColNum As Integer
'Dim doc As MSHTML.HTMLDocument
'these are test vars-----------------
strStore = "Data"
strOrder = "Data"
'----------------------------------
strLoadingSpinner = "spinnerUnique"
strCssAttributeSpinner = "style"
strCssTextSpinner = "display: none;"
strUsername = "example"
strPassword = "EXample"
strStoreDomId = "orderLocInputId"
strBtnStoreUpdateDomId = "orderLocValueUpdate"
strPosUrl = "https://example.jsp"
Set objBrowser = New InternetExplorerMedium
objBrowser.Visible = True
browserNavigate strPosUrl, objBrowser
browserWait objBrowser
blnSsoLogin = ssoLoginCheck(objBrowser)
Select Case blnSsoLogin
Case Is = True
ssoLoginMod strUsername, strPassword, objBrowser
browserWait objBrowser
Case Is = False
End Select
fillTextboxWithId objBrowser, strStoreDomId, strStore
clickButtonWithId objBrowser, strBtnStoreUpdateDomId
browserWait objBrowser
foundOrNot strLoadingSpinner, strCssAttributeSpinner, _
strCssTextSpinner, objBrowser
'-----------------------------------------------------
Dim IFrameText As Object
Set IFrameText = objBrowser.document.getElementById("frmHome")
IFrameText.HTML.getElementById("ordernum").Value = "1223"
Dim x As String
objBrowser.navigate "https://xxxxxxx.xxxxxxx.com" & x
x = objBrowser.LocationURL
x = "just messing with stuff"
Set IFrameText = objBrowser.document.getElementById("frmHome")
Dim elem As Object
For Each elem In IFrameText
If elem.innerText Like "*true*" Then
MsgBox (elem)
End If
Next
属性决定了将要呈现的键盘布局。