iOS系统键盘演示

*******首先是textField的三个常用属性*****

filed.autocapitalizationType=UITextAutocapitalizationTypeNone;//设置句首大写为None

filed.autocorrectionType=UITextAutocorrectionTypeNo;//设置不自动纠错

filed.secureTextEntry=YES;//设置不可视

************    ************




写UITextField时候总是会用到系统自带的keyboard.选用什么样的type,每次都会在这个地方卡壳。

这里把每个type对应的图片粘下来,便于记忆和查找。

typedefNS_ENUM(NSInteger, UIKeyboardType) {

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).(见下)

UIKeyboardTypeDecimalPadNS_ENUM_AVAILABLE_IOS(4_1),// A number pad with a decimal point.(见下)


UIKeyboardTypeTwitterNS_ENUM_AVAILABLE_IOS(5_0),// A type optimized for twitter text entry (easy access to @ #)(见下)

UIKeyboardTypeWebSearchNS_ENUM_AVAILABLE_IOS(7_0),// A default keyboard type with URL-oriented addition (shows space . prominently).(见下)

UIKeyboardTypeAlphabet =UIKeyboardTypeASCIICapable,// Deprecated(见下)



};




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

相关阅读更多精彩内容

友情链接更多精彩内容