iOS鍵盤類型最全


 

一、鍵盤風格  

UIKit框架支持8種風格鍵盤。

    1. typedef enum {  
    2.     UIKeyboardTypeDefault,                // 默認鍵盤:支持所有字符   
    3.     UIKeyboardTypeASCIICapable,           // 支持ASCII的默認鍵盤   
    4.     UIKeyboardTypeNumbersAndPunctuation,  // 標准電話鍵盤,支持+*#等符號   
    5.     UIKeyboardTypeURL,                    // URL鍵盤,有.com按鈕;只支持URL字符   
    6.     UIKeyboardTypeNumberPad,              //數字鍵盤   
    7.     UIKeyboardTypePhonePad,               // 電話鍵盤   
    8.     UIKeyboardTypeNamePhonePad,           // 電話鍵盤,也支持輸入人名字   
    9.     UIKeyboardTypeEmailAddress,           // 用於輸入電子郵件地址的鍵盤   
    10. } UIKeyboardType; 

 

用法用例:

textView.keyboardtype= UIKeyboardTypeNumberPad;

 

UIKeyboardTypeDefault:

 

 

UIKeyboardTypeASCIICapable:

 

UIKeyboardTypeNumbersAndPunctuation:

 

 

UIKeyboardTypeURL:

 

UIKeyboardTypeNumberPad:

 

UIKeyboardTypePhonePad:

 

UIKeyboardTypeNamePhonePad:

 

UIKeyboardTypeEmailAddress:

 

UIKeyboardTypeDecimalPad:

 

UIKeyboardTypeTwitter:

 

UIKeyboardTypeWebSearch:

 

UIKeyboardTypeAlphabet:

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM