一、鍵盤風格
UIKit框架支持8種風格鍵盤。
- typedef enum {
- UIKeyboardTypeDefault, // 默認鍵盤:支持所有字符
- UIKeyboardTypeASCIICapable, // 支持ASCII的默認鍵盤
- UIKeyboardTypeNumbersAndPunctuation, // 標准電話鍵盤,支持+*#等符號
- UIKeyboardTypeURL, // URL鍵盤,有.com按鈕;只支持URL字符
- UIKeyboardTypeNumberPad, //數字鍵盤
- UIKeyboardTypePhonePad, // 電話鍵盤
- UIKeyboardTypeNamePhonePad, // 電話鍵盤,也支持輸入人名字
- UIKeyboardTypeEmailAddress, // 用於輸入電子郵件地址的鍵盤
- } UIKeyboardType;
用法用例:
textView.keyboardtype= UIKeyboardTypeNumberPad;
UIKeyboardTypeDefault:

UIKeyboardTypeASCIICapable:

UIKeyboardTypeNumbersAndPunctuation:

UIKeyboardTypeURL:

UIKeyboardTypeNumberPad:

UIKeyboardTypePhonePad:

UIKeyboardTypeNamePhonePad:

UIKeyboardTypeEmailAddress:

UIKeyboardTypeDecimalPad:

UIKeyboardTypeTwitter:

UIKeyboardTypeWebSearch:

UIKeyboardTypeAlphabet:

