iphone – Xcode中的数字键盘

iphone – Xcode中的数字键盘,第1张

概述有没有人知道如何在 iphone中显示数字键盘而不是默认键盘?有没有一种方法来过滤数字的文本字段?我需要从代码不是从界面构建器 谢谢 或者,在代码中设置textfield的keyboardType属性: textField.keyboardType = UIKeyboardTypeNumberPad 可用选项有: UIKeyboardType The type of keyboard to dis 有没有人知道如何在 iphone中显示数字键盘而不是默认键盘?有没有一种方法来过滤数字的文本字段?我需要从代码不是从界面构建器

@H_404_8@

谢谢@H_404_8@解决方法 或者,在代码中设置textfIEld的keyboardType属性:

@H_404_8@

@H_404_8@

textFIEld.keyboardType = UIKeyboardTypeNumberPad

可用选项有:@H_404_8@

@H_404_8@

UIKeyboardType The type of keyboard to
display for a given text-based vIEw.@H_404_8@

typedef enum {
UIKeyboardTypeDefault,
UIKeyboardTypeASCIICapable,
UIKeyboardTypeNumbersAndPunctuation,
UIKeyboardTypeURL,
UIKeyboardTypeNumberPad,
UIKeyboardTypePhonePad,
UIKeyboardTypenamePhonePad,
UIKeyboardTypeEmailAddress,
UIKeyboardTypeAlphabet =
UIKeyboardTypeASCIICapable }
UIKeyboardType;@H_404_8@

一个谨慎的说法,但是NumberPad没有输入的小数点.如果你需要,你必须使用别的东西.@H_404_8@ 总结

以上是内存溢出为你收集整理的iphone – Xcode中的数字键盘全部内容,希望文章能够帮你解决iphone – Xcode中的数字键盘所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1057652.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存