UIKeyboardType 图解

UIKit > UIKeyboardType

枚举(Enumeration)

UIKeyboardType

显示在给定的以文本为基础的视图上的键盘类型。

声明

typedef enum UIKeyboardType : NSInteger {
    UIKeyboardTypeDefault,
    UIKeyboardTypeASCIICapable,
    UIKeyboardTypeNumbersAndPunctuation,
    UIKeyboardTypeURL,
    UIKeyboardTypeNumberPad,
    UIKeyboardTypePhonePad,
    UIKeyboardTypeNamePhonePad,
    UIKeyboardTypeEmailAddress,
    UIKeyboardTypeDecimalPad,
    UIKeyboardTypeTwitter,
    UIKeyboardTypeWebSearch,
    UIKeyboardTypeASCIICapableNumberPad,
    UIKeyboardTypeAlphabet = UIKeyboardTypeASCIICapable
} UIKeyboardType;

特征


常量

UIKeyboardTypeDefault
为当前输入方法指定默认键盘。

UIKeyboardTypeDefault

UIKeyboardTypeASCIICapable
指定显示标准阿西克(ASCII)字符的键盘。

UIKeyboardTypeASCIICapable

UIKeyboardTypeNumbersAndPunctuation
指定数字和标点符号键盘。

UIKeyboardTypeNumbersAndPunctuation

UIKeyboardTypeURL
指定为录入URL而优化的键盘。这个键盘类型明显突出了点(“.”)和反斜线(“/”)符号以及“.com”字符串。

UIKeyboardTypeURL

UIKeyboardTypeNumberPad
指定为录入PIN而设计的数字键盘。这个键盘类型明显突出了数字0到9。这个键盘类型不支持自动大写(auto-capitalization)。

UIKeyboardTypePhonePad
指定为输入电话号码而设计的键盘。这个键盘类型明显突出了数字0到9以及“*”和“#”符号。这个键盘类型不支持自动大写。

UIKeyboardTypePhonePad
UIKeyboardTypePhonePad

UIKeyboardTypeNamePhonePad
指定为输入人名或电话号码而设计的键盘。这个键盘类型不支持自动大写。

UIKeyboardTypeNamePhonePad
UIKeyboardTypeNamePhonePad

UIKeyboardTypeEmailAddress
指定为录入电子邮箱地址而优化的键盘。这个键盘类型明显突出了at(“@”),点(“.”)和空格符号。

UIKeyboardTypeEmailAddress

UIKeyboardTypeDecimalPad
指定带有数字和小数点的键盘。

UIKeyboardTypeDecimalPad

UIKeyboardTypeTwitter
指定为输入Twitter文字而优化的键盘,容易按到at(“@”)和井号(“#”)符号。

UIKeyboardTypeTwitter

UIKeyboardTypeWebSearch
指定为网络搜索方面和URL录入而优化的键盘。这个键盘类型明显突出了空格和点(“.”)符号。

UIKeyboardTypeWebSearch

UIKeyboardTypeASCIICapableNumberPad
指定了数字面板,只输出阿西克位。

UIKeyboardTypeNumberPad数字键盘在ios10下无效了,新的枚数字类型:UIKeyboardTypeASCIICapableNumberPad

UIKeyboardTypeASCIICapableNumberPad

UIKeyboardTypeAlphabet
指定了为字母录入而优化的键盘。

Deprecated
使用 UIKeyboardTypeASCIICapable 替代。

UIKeyboardTypeAlphabet
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容