iPad 开发新手。我想在 iPad 上使用自定义数字键盘(使用 pod),但在 iPhone 上使用本机键盘。是否可以在 UITextField、UITextView 上进行扩展以设置/获取 inputView/keyboardType?还是有其他解决方案?
myTextField.keyboardType = .decimalPad
extension UITextField {
....
case .decimalPad:
if UIDevice.current.userInterfaceIdiom == .pad {
...
}