UITextInputTraits

来源:互联网 发布:c语言将字符转换为数字 编辑:程序博客网 时间:2024/06/05 07:48

      UITextInputTraits:键盘输入特性 (这是一个文本输入的协议,一共有8个属性)

      autocapitalizationType:自动大写输入

              取值为UITextAutocapitalizationType一共有四种情况:

              UITextAutocapitalizationTypeNone:不自动大写

              UITextAutocapitalizationTypeWords:首字母大写

               UITextAutocapitalizationTypeSentences:句子的首字母大写  (默认情况)

               UITextAutocapitalizationTypeAllCharacters:   所有字母都大写

      autocorrectionType:自动矫正

              取值为UITextAutocorrectionType一共三中情况

              UITextAutocorrectionTypeDefault:默认
              UITextAutocorrectionTypeNo:不自动矫正
              UITextAutocorrectionTypeYes:自动矫正

       spellCheckingType:拼写更正

              取值为UITextSpellCheckingType一共三种情况

              UITextSpellCheckingTypeDefault:默认
              UITextSpellCheckingTypeNo:不更正
              UITextSpellCheckingTypeYes:更正

       keyboardType:键盘风格

              取值为UIKeyboardType到目前未知一共有11种键盘类型

              UIKeyboardTypeDefault:默认  支持所有字符

              UIKeyboardTypeASCIICapable:支持ASCll键盘

              UIKeyboardTypeNumbersAndPunctuation:标准电话键盘

              UIKeyboardTypeURL:URL键盘

              UIKeyboardTypeNumberPad:数字键盘

              UIKeyboardTypePhonePad:电话键盘

              UIKeyboardTypeNamePhonePad:电话键盘同时也可以输入人名

              UIKeyboardTypeEmailAddress:电子邮箱地址输入键盘

              UIKeyboardTypeDecimalPad:小数点数字键盘

              UIKeyboardTypeTwitter:高级键盘包含@#

              UIKeyboardTypeWebSearch:网络突出键盘 (ios7加入)

              UIKeyboardTypeAlphabet = UIKeyboardTypeASCIICapable

      keyboardAppearance:UIKeyboardAppearance 键盘外观

              取值是UIKeyboardAppearance一共三中情况

                  UIKeyboardAppearanceDefault:默认情况
                  UIKeyboardAppearanceDark:暗色键盘  (iOS7加入)
                  UIKeyboardAppearanceLight:亮色键盘  (iOS7加入)
                  UIKeyboardAppearanceAlert = UIKeyboardAppearanceDark

       returnKeyType:返回键类型

              取值是UIReturnKeyType到目前为止一共有12中形式

              UIReturnKeyDefault:默认return键盘
              UIReturnKeyGo:返回键为蓝色GO
              UIReturnKeyGoogle:返回键为蓝色Googel,用于搜索
              UIReturnKeyJoin:返回键为蓝色Join
              UIReturnKeyNext:返回键为蓝色Next
              UIReturnKeyRoute:返回键为蓝色Route
              UIReturnKeySearch:返回键为蓝色Search
              UIReturnKeySend:返回键为蓝色Send
              UIReturnKeyYahoo:返回键为蓝色Yahoo,用于搜索
              UIReturnKeyDone:返回键为蓝色Done
              UIReturnKeyEmergencyCall:紧急呼叫按钮

              UIReturnKeyContinue:返回键是Continue(iOS9加入)  

      enablesReturnKeyAutomatically:自动返回键(没有字符返回键是灰色不可点击,默认是NO不支持,YES支持)

      secureTextEntry:是否安全输入模式(返回YES密码模式及安全模式,返回NO非安全模式)       


 

1 0
原创粉丝点击