UIKeyboardType类型

UIKeyboardType是一个枚举;如下

typedef enum {

    UIKeyboardTypeDefault,                // Default type for the current input method.

    UIKeyboardTypeASCIICapable,           // Displays a keyboard which can enter ASCII characters, non-ASCII keyboards remain active

    UIKeyboardTypeNumbersAndPunctuation,          // Numbers and assorted punctuation.

    UIKeyboardTypeURL,                    // A type optimized for URL entry (shows . / .com prominently).

    UIKeyboardTypeNumberPad,              // A number pad (0-9). Suitable for PIN entry.

    UIKeyboardTypePhonePad,               // A phone pad (1-9, *, 0, #, with letters under the numbers).

    UIKeyboardTypeNamePhonePad,           // A type optimized for entering a person's name or phone number.

    UIKeyboardTypeEmailAddress,           // A type optimized for multiple email address entry (shows space @ . prominently).

    UIKeyboardTypeAlphabet = UIKeyboardTypeASCIICapable, // Deprecated

} UIKeyboardType;

下面是各个类型的样式

  • UIKeyboardTypeAlphabet(Alphabet字母),UIKeyboardTypeASCIICapable,UIKeyboardTypeDefault: (这三个默认都显示字母表--下面第一幅图,另外可以切换倒--下面第二幅图)

  • UIKeyboardTypeDecimalPad: (Decimal十进制)
  • UIKeyboardTypeEmailAddress:
  • UIKeyboardTypeNamePhonePad:(这个类型默认显示第一幅图片,如果点击123按钮则会显示第二副键盘)

  • UIKeyboardTypeNumberPad:(下图显示)
  • UIKeyboardTypeNumbersAndPunctuation:(默认显示下面第一幅图,切换显示第二幅)

  • UIKeyboardTypeTwitter:(默认显示下面第一幅图,切换显示第二幅)

最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 1、英文键盘: UIKeyboardTypeAlphabet(Alphabet字母) UIKeyboardType...
    罗小耳阅读 3,971评论 0赞 2
  • 这篇不是技术篇,只是为了看看不同的键盘的样子。毕竟容易忘记 1、英文键盘:UIKeyboardTypeAlphab...
    進无尽阅读 1,227评论 1赞 3
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 137,246评论 19赞 139
  • 自己也不认识自己了 恍若尘封了好几个世纪 不经意间 寻觅到的古旧瓷器 轻拂尘土 釉面斑驳 隐现些许昏暗幽幽的光 光...
    壹曉張阅读 338评论 0赞 4
  • 有些事情总是好事多磨的,有些事情总是始料未及的,但这并非所有。当然也有例外的。 ——题记 1 前天表姐来我家...
    洛漾熙_0d2a阅读 498评论 0赞 1

友情链接更多精彩内容