iOS开发-键盘式样风格有关设置
iOS开发---键盘样式风格有关设置一、键盘风UIKit框架支持8种风键盘。typedef enum {UIReturnKeyDefault,//默
iOS开发---键盘样式风格有关设置
一、键盘风格
UIKit框架支持8种风格键盘。
- typedef enum {
- UIReturnKeyDefault, //默认:灰色按钮,标有Return
- UIReturnKeyGo, //标有Go的蓝色按钮
- UIReturnKeyGoogle, //标有Google的蓝色按钮,用于搜索
- UIReturnKeyJoin, //标有Join的蓝色按钮
- UIReturnKeyNext, //标有Next的蓝色按钮
- UIReturnKeyRoute, //标有Route的蓝色按钮
- UIReturnKeySearch, //标有Search的蓝色按钮
- UIReturnKeySend, //标有Send的蓝色按钮
- UIReturnKeyYahoo, //标有Yahoo!的蓝色按钮,用于搜索
- UIReturnKeyDone, //标有Done的蓝色按钮
- UIReturnKeyEmergencyCall, //紧急呼叫按钮
- } UIReturnKeyType;
用法用例:
textView.returnKeyType=UIReturnKeyGo;
四、自动大写
= UITextAutocapitalizationTypeWords;五、自动更正
- typedef enum { UITextAutocorrectionTypeDefault,//默认
- UITextAutocorrectionTypeNo,//不自动更正 UITextAutocorrectionTypeYes,//自动更正
- } UITextAutocorrectionType;
用法用例:
textField.autocorrectionType = UITextAutocorrectionTypeYes;
六、安全文本输入
textView.secureTextEntry=YES;
开启安全输入主要是用于密码或一些私人数据的输入,此时会禁用自动更正和自此缓存。