First, the keyboard style
The Uikit Framework supports 8 styles of keyboards.
typedef enum {
Uikeyboardtypedefault,//default keyboard: Supports all characters uikeyboardtypeasciicapable, //support ascii default keyboard Uikeyboardtypenumbersandpunctuation, //standard telephone keypad, support +* #等符号 Span class= "Hljs-constant" >uikeyboardtypeurl, //url keyboard, There are. com buttons, only url characters uikeyboardtypenumberpad, //Numeric keypad uikeyboardtypephonepad, //telephone keypad uikeyboardtypenamephonepad, //telephone keypad, also supports input person name uikeyboardtypeemailaddress, //keyboard for entering e-mail addresses
} Uikeyboardtype;
Usage Use cases:
Textview.keyboardtype= Uikeyboardtypenumberpad;
Second, keyboard appearance
typedef enum {
UIKeyboardAppearanceDefault, // 默认外观:浅灰色 UIKeyboardAppearanceAlert, //深灰/石墨色
} uikeyboardappearance;
Usage Use cases:
Textview.keyboardappearance=uikeyboardappearancedefault;
Third, enter
typedef enum {
//默认:灰色按钮,标有ReturnUIReturnKeyGo, //标有Go的蓝色按钮UIReturnKeyGoogle, //标有Google的蓝色按钮,用于搜索UIReturnKeyJoin, //标有Join的蓝色按钮UIReturnKeyNext, //标有Next的蓝色按钮UIReturnKeyRoute, //标有Route的蓝色按钮UIReturnKeySearch, //标有Search的蓝色按钮UIReturnKeySend, //标有Send的蓝色按钮UIReturnKeyYahoo, //标有Yahoo!的蓝色按钮,用于搜索UIReturnKeyDone, //标有Done的蓝色按钮UIReturnKeyEmergencyCall, //紧急呼叫按钮
} Uireturnkeytype;
Usage Use cases:
Textview.returnkeytype=uireturnkeygo;
Four, automatic capitalization
typedef enum {
//不自动大写 UITextAutocapitalizationTypeWords, //单词首字母大写 UITextAutocapitalizationTypeSentences, //句子首字母大写 UITextAutocapitalizationTypeAllCharacters, //所有字母大写
} Uitextautocapitalizationtype;
Usage Use cases:
Textfield.autocapitalizationtype = Uitextautocapitalizationtypewords;
Five, automatic correction
typedef enum {
UITextAutocorrectionTypeDefault,//默认 UITextAutocorrectionTypeNo,//不自动更正 UITextAutocorrectionTypeYes,//自动更正
} Uitextautocorrectiontype;
Usage Use cases:
Textfield.autocorrectiontype = Uitextautocorrectiontypeyes;
Six, secure text input
Textview.securetextentry=yes;
Turning on secure input is primarily for passwords or some private data input, which disables AutoCorrect and self-caching.
iOS keyboard Related settings (Uitextfield)