一、键盘风格

支持8种风格键盘。

typedef enum {

UIKeyboardTypeDefault, // 默认键盘:支持所有字符

UIKeyboardTypeASCIICapable, // 支持ASCII的默认键盘

UIKeyboardTypeNumbersAndPunctuation, // 标准电话键盘,支持+*#等符号

UIKeyboardTypeURL, // URL键盘,有.com按钮;只支持URL字符

UIKeyboardTypeNumberPad, //数字键盘

UIKeyboardTypePhonePad, // 电话键盘

UIKeyboardTypeNamePhonePad, // 电话键盘,也支持输入人名字

UIKeyboardTypeEmailAddress, // 用于输入电子邮件地址的键盘

} UIKeyboardType;

用法用例:

textField.keyboardtype = UIKeyboardTypeNumberPad;

二、键盘外观

typedef enum {

UIKeyboardAppearanceDefault, // 默认外观:浅灰色

UIKeyboardAppearanceAlert, //深灰/石墨色

} UIKeyboardAppearance;

用法用例:

textField.keyboardAppearance=UIKeyboardAppearanceDefault;

三、回车键

typedef enum {

UIReturnKeyDefault, //默认:灰色按钮,标有Return

UIReturnKeyGo, //标有Go的蓝色按钮

UIReturnKeyGoogle, //标有Google的蓝色按钮,用于搜索

UIReturnKeyJoin, //标有Join的蓝色按钮

UIReturnKeyNext, //标有Next的蓝色按钮

UIReturnKeyRoute, //标有Route的蓝色按钮

UIReturnKeySearch, //标有Search的蓝色按钮

UIReturnKeySend, //标有Send的蓝色按钮

UIReturnKeyYahoo, //标有Yahoo!的蓝色按钮,用于搜索

UIReturnKeyDone, //标有Done的蓝色按钮

UIReturnKeyEmergencyCall, //紧急呼叫按钮

} UIReturnKeyType;

用法用例:

textField.returnKeyType=UIReturnKeyGo;

四、输入框变为密码框

textField.secureTextEntry=Yes;

iOS 键盘类型定制归纳的更多相关文章

  1. iOS 键盘类型

    版权声明:本文为博主原创文章.请尊重作者劳动成果,转载请注明出处. UIKeyboardTypeDefault: UIKeyboardTypeASCIICapable: UIKeyboardTypeN ...

  2. iOS键盘类型

    一.键盘风格 UIKit框架支持8种风格键盘. typedef enum { UIKeyboardTypeDefault,                // 默认键盘:支持所有字符 UIKeyboa ...

  3. iOS键盘类型最全

    一.键盘风格 UIKit框架支持8种风格键盘. typedef enum { UIKeyboardTypeDefault,                // 默认键盘:支持所有字符 UIKeyboa ...

  4. iOS 键盘类型UIKeyboardType

    UIKeyboardTypeDefault: UIKeyboardTypeASCIICapable: UIKeyboardTypeNumbersAndPunctuation: UIKeyboardTy ...

  5. iOS键盘类型以及样式展示

    UIKeyboardTypeDefault: UIKeyboardTypeASCIICapable: UIKeyboardTypeNumbersAndPunctuation: UIKeyboardTy ...

  6. IOS - 键盘处理

    iOS 发布了很多关于屏幕上键盘的通知.下面列出了这些通知的简要解释: UIKeyboardWillShowNotification 当键盘即将要显示的时候将会发出这个通知.这个通知包含了用户信息库, ...

  7. iOS开发小技巧--iOS键盘 inputView 和 inputAccessoryView

    iOS键盘 inputView 和 inputAccessoryView 1.inputAccessoryView UITextFields和UITextViews有一个inputAccessoryV ...

  8. GetKeyboardType获取键盘类型(通过键盘可初步判断用户使用的是台式电脑还是笔记本电脑)

    函数功能:该函数获取系统当前键盘的信息. int WINAPI GetKeyboardType( __in int nTypeFlag ); 参数说明:nTypeFlag:指定要获取的键盘信息的类型, ...

  9. IOS键盘样式风格有关设置

    一.键盘风格 UIKit框架支持8种风格键盘. typedef  enum  { UIKeyboardTypeDefault,                 // 默认键盘:支持所有字符 UIKey ...

随机推荐

  1. 杭电ACM 1178

    #include<stdio.h>#include<string.h>#include<math.h>#include<ctype.h>#include ...

  2. Construct a tree from Inorder and Level order traversals

    Given inorder and level-order traversals of a Binary Tree, construct the Binary Tree. Following is a ...

  3. Bash中各种以$开头的特殊变量的含义

    $$ Shell本身的PID(ProcessID) $! Shell最后运行的后台Process的PID $? 最后运行的命令的结束代码(返回值) $- 使用Set命令设定的Flag一览 $* 所有参 ...

  4. ios-获取通讯录 姓名和电话

    #import "ViewController.h" #import <ContactsUI/ContactsUI.h> @interface ViewControll ...

  5. Cannot create a server using the selected type.

    1.退出 eclipse 2.到[工程目录下]/.metadata/.plugins/org.eclipse.core.runtime 3.把org.eclipse.wst.server.core.p ...

  6. Android NDK开发之Jni调用Java对象

    https://my.oschina.net/zhiweiofli/blog/114064 通过使用合适的JNI函数,你可以创建Java对象,get.set 静态(static)和 实例(instan ...

  7. XAMPP PHP redis 扩展

    1.php增加redis扩展 echo phpinfo();exit;查看php 版本以及 vc运行库 可知 X86 MSVC11  PHP5.6   首先把对应版本的php_redis.dll 和 ...

  8. ngrok 外网访问小能手

    以前在学校的时候想把自己做的网站发布让外网访问,可是又没有虚拟服务器和域名就显得异常的麻烦,曾经试过花生壳映射,效果虽然还不错,但是略显麻烦.今天找到一个更方便的小工具--ngrok ! 简单的介绍一 ...

  9. LeetCode Power of Three

    原题链接在这里:https://leetcode.com/problems/power-of-three/ 与Power of Two类似.检查能否被3整除,然后整除,再重复检查结果. Time Co ...

  10. VirtualBox Win7 虚拟机 共享文件夹设置

    1.主机(Win10) 点击共享文件夹,例如D:\VMs\Sharefolder\,选择'属性->共享->共享',选择'Everyone',点击'添加',权限级别'读取/写入',然后一路点 ...