[英]how to identify the visible keyboard is whether numberpad or default keyboard?
如何識別可見鍵盤是數字鍵盤還是默認鍵盤?
您應該向UITextInputTraits詢問其keyboardType-propery。 UITextField和UITextView均實現此協議。
一個例子是:
if(myTextField.keyboardType == UIKeyboardTypeURL) {
// do something if it wants URLs
}
查看文檔以獲取更多信息。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.