【发布时间】:2018-07-16 06:18:15
【问题描述】:
iPad 开发新手。我想在 iPad 上使用自定义数字键盘(使用 pod),但在 iPhone 上使用本机键盘。是否可以在 UITextField、UITextView 上进行扩展以设置/获取 inputView/keyboardType?还是有其他解决方案?
myTextField.keyboardType = .decimalPad
extension UITextField {
....
case .decimalPad:
if UIDevice.current.userInterfaceIdiom == .pad {
...
}
【问题讨论】:
标签: swift ipad numeric-keypad