键盘类型UIKeyboardType
UITextField、UITextView等能够调出系统键盘的控件,通过下面这个属性可以控制弹出键盘的样式:
self.priceTextField.keyboardType = UIKeyboardTypeDecimalPad;
下面枚举下,常见的13种键盘样式
1.UIKeyboardTypeDefault(当前输入法的默认类型)

2.UIKeyboardTypeASCIICapable(显示一个可以输入ASCII字符的键盘)

3.UIKeyboardTypeNumbersAndPunctuation(数字和分类标点符号)

4.UIKeyboardTypeURL(为URL条目优化的类型(显著的显示“.”、“/”、“.com”))

5.UIKeyboardTypeNumberPad(只能输入整数)

6.UIKeyboardTypePhonePad(适用于拨号)

7.UIKeyboardTypeNamePhonePad(为输入某人的姓名或电话号码而优化的一种类型)

8.UIKeyboardTypeEmailAddress(为多个电子邮件地址条目优化的类型(显著的显示@))

9.UIKeyboardTypeDecimalPad(带小数点的数字键盘)

10.UIKeyboardTypeTwitter(一种优化的Twitter文本条目(易于使用@))

11.UIKeyboardTypeWebSearch(输入URL条目推荐的键盘样式,显著的显示Go、搜索)

12.UIKeyboardTypeAlphabet == UIKeyboardTypeASCIICapable(官方不建议使用)

13、UIKeyboardTypeASCIICapableNumberPad(iOS10后出现的数字键盘)

键盘类型UIKeyboardType的更多相关文章
- 【改】iOS学习之键盘类型UIKeyboardType
关于 UITextField 的键盘是可以自定义的,正好在一个代码用这个,就总结一下. 在 UITextField 中有一个 keyboardType 属性,它的类型是一个枚举值,下面就是枚举值和对应 ...
- iOS 键盘类型UIKeyboardType
UIKeyboardTypeDefault: UIKeyboardTypeASCIICapable: UIKeyboardTypeNumbersAndPunctuation: UIKeyboardTy ...
- GetKeyboardType获取键盘类型(通过键盘可初步判断用户使用的是台式电脑还是笔记本电脑)
函数功能:该函数获取系统当前键盘的信息. int WINAPI GetKeyboardType( __in int nTypeFlag ); 参数说明:nTypeFlag:指定要获取的键盘信息的类型, ...
- iOS 键盘类型
版权声明:本文为博主原创文章.请尊重作者劳动成果,转载请注明出处. UIKeyboardTypeDefault: UIKeyboardTypeASCIICapable: UIKeyboardTypeN ...
- 与众不同 windows phone (24) - Input(输入)之软键盘类型, XNA 方式启动软键盘, UIElement 的 Touch 相关事件, 触摸涂鸦
原文:与众不同 windows phone (24) - Input(输入)之软键盘类型, XNA 方式启动软键盘, UIElement 的 Touch 相关事件, 触摸涂鸦 [索引页][源码下载] ...
- EditText ------- 键盘类型
文本输入框指定软键盘类型和软键盘回车键图标设置, 转载:http://blog.csdn.net/wirelessqa/article/details/8567327
- XF 键盘类型设置
键盘类型: default Chat-输入短信或表情 Email Numeric Telephone Url-输入网址和文件路径 其他额外选项: CapitalizeSentence SpellChe ...
- input属性控制弹出键盘类型
/** * ios弹起数字键盘有三种方法 * 1. <input type="number"> 可以弹起带有小数点的键盘,可以键盘不干净,有其它各种字符,可切换 ...
- iOS 键盘类型定制归纳
一.键盘风格 支持8种风格键盘. typedef enum { UIKeyboardTypeDefault, // 默认键盘:支持所有字符 UIKeyboardTypeASCIICapable, // ...
随机推荐
- 使用node查询数据库(mysql)时,日期格式不对的问题。
https://blog.csdn.net/chanlingmai5374/article/details/93190983 1.问题场景 数据库里存了 datetime.但 Node 查询出来是这样 ...
- Implementing Recurrent Neural Network from Scratch
Reading CSV file... Parsed 79171 sentences. Found 65376 unique words tokens. Using vocabulary size 8 ...
- bfs迷宫
链接:https://ac.nowcoder.com/acm/contest/338/BSleeping is a favorite of little bearBaby, because the w ...
- Vacuum Pump Manufacturer - Vacuum Pump: Prevents Reactive Compound Decomposition Products
Vacuum packaging has been popular in the industry for a long time. Many large companies have joined ...
- pair node stack vector string priority_queue
multiset 元素重复 自动排序 map #include <bits/stdc++.h> using namespace std; map<int,int> s;//自当 ...
- SpringMvc 项目配置
spring-mvc.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns=&quo ...
- iOS 开发之 设计模式【一】原型模式 (Prototype pattern)
原型模式(Prototype pattern): 定义:使用原型实例指定创建对象的种类,并通过复制这个原型创建对象.也可以理解为模板,在创建新对象的时候,按照模板的方法来复制,避免重复造轮子. 简单来 ...
- [WC2018]州区划分(状压,子集卷积)
[洛谷题面]https://www.luogu.org/problemnew/show/P4221 首先考虑判定一个子图是否合法: (1)连通:并查集判断即可. (2)没有欧拉回路:存在欧拉回路的条件 ...
- Linux kali安装或更新之后出现乱码
打开终端,输入以下命令,之后重启. apt-get install ttf-wqy-zenhei
- RDLC 表达式设置精度
=IIf(RTrim(Parameters!u_currency.Value)="VND","F0","F2")