【问题标题】:Open standard iOS keyboard, instead of custom one打开标准 iOS 键盘,而不是自定义键盘
【发布时间】:2017-12-21 21:42:35
【问题描述】:

我正在打电话给becomeFirstResponder,并用它显示键盘。

[inputTextField becomeFirstResponder];

但是,它显示了安装在测试设备上的自定义键盘。有没有办法为数字键盘显示 iOS 标准键盘?

【问题讨论】:

  • txtFiled.keyboardType = UIKeyboardTypeDefault
  • 我只需要显示数字,所以我使用的是 UIKeyboardTypeNumberPad。
  • 对于关键字您是否使用过任何第三方关键字。如果您正在使用,请检查关键字子视图
  • Swiftkey 安装在其中一台测试设备上。该问题发生在该电话上。我想为所有设备显示默认数字键盘,无论它们是否安装了自定义键盘。

标签: ios cocoa-touch uikeyboard uiresponder


【解决方案1】:

来自原始答案列表:Prevent custom keyboard in textfield

- (BOOL)application:(UIApplication *)application shouldAllowExtensionPointIdentifier:(NSString *)extensionPointIdentifier {
    if ([extensionPointIdentifier isEqualToString: UIApplicationKeyboardExtensionPointIdentifier]) {
        return NO;
    }
    return YES;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-02-08
    • 1970-01-01
    • 2012-09-12
    • 1970-01-01
    • 2015-08-05
    • 2014-08-11
    • 1970-01-01
    • 2016-09-14
    相关资源
    最近更新 更多