当前位置:首页 > 操作系统 > Ios

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:

技术分享

 

 

 

原文:http://www.cnblogs.com/OIMM/p/5203262.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!