
本人ios开发初学者,请问ios如何自动切换键盘
2个回答
展开全部
ios的键盘类型的设置一般是绑定在输入控件的属性上。如UITextField,UITextView,UISearchBar等控件。
textField.keyboardType=UIKeyboardTypeAlphabet;
UIKeyboardType还有如下的几种类型。根据你设置的类型不同,显示的键盘不同。
UIKeyboardTypeAlphabet
UIKeyboardTypeASCIICapable
UIKeyboardTypeDecimalPad
UIKeyboardTypeDefault
UIKeyboardTypeEmailAddress
UIKeyboardTypeNamePhonePad
UIKeyboardTypeNumberPad
。。。。。。
textField.keyboardType=UIKeyboardTypeAlphabet;
UIKeyboardType还有如下的几种类型。根据你设置的类型不同,显示的键盘不同。
UIKeyboardTypeAlphabet
UIKeyboardTypeASCIICapable
UIKeyboardTypeDecimalPad
UIKeyboardTypeDefault
UIKeyboardTypeEmailAddress
UIKeyboardTypeNamePhonePad
UIKeyboardTypeNumberPad
。。。。。。
追问
太感谢了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询