美文网首页iOS Developer
iOS系统键盘演示

iOS系统键盘演示

作者: 加基特 | 来源:发表于2016-07-19 12:21 被阅读79次

    *******首先是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(见下)

    };




    相关文章

      网友评论

        本文标题:iOS系统键盘演示

        本文链接:https://www.haomeiwen.com/subject/xmpmjttx.html