显示软键盘(iPad)时连接蓝牙输入设备 [英] display soft keyboard (iPad) when is connected a bluetooth input device

查看:680
本文介绍了显示软键盘(iPad)时连接蓝牙输入设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很疯狂,因为当有一个蓝牙输入设备连接到iPad时,我找不到显示软键盘的方式。我在网上进行了一些搜索,这是结果:





Erica说,诀窍是回答系统没有连接硬件键盘。
我试图为UIKeyboardImpl编写一个类别,我覆盖了:

   - (BOOL)isInHardwareKeyboardMode {
DEBUG(@被称为);
return NO;
}

但是直到现在我还没有获得任何东西。调用覆盖方法,但没有软键盘。
Erica还说应用程序通过动态链接工作,但我不知道如何完成它。我不需要在AppStore,因为这是一个私人应用程序,所以我不打扰拒绝。



提前感谢

解决方案

好的。终于得到了。非常感谢David,Matthias和Enrico。以下是步骤:




  • 导入私人框架GraphicsServices

  • 调用GSEventSetHardwareKeyboardAttached viewDidLoad

  • 添加一个按钮,通过调用

    切换键盘。

      static void toggleKeyboard(UIKeyboardImpl * keyImpl){
    if(UIKeyboardAutomaticIsOnScreen()){
    UIKeyboardOrderOutAutomatic();
    } else {
    UIKeyboardOrderInAutomatic();
    }




此功能在 http://code.google.com/p/btstack/wiki/iPhoneKeyboard隐藏 $ b上$ b现在我可以从软键盘和蓝牙设​​备同时获取输入。


I'm really bangin' my head because I can't find the way to show the soft keyboard when there's a bluetooth input device connected to the iPad. I made some search on the web and this is the result:

Erica said that the trick is to answer to the system that "There's no hardware keyboard attached". I tried to write a category for UIKeyboardImpl and I overrided:

- (BOOL)isInHardwareKeyboardMode {
    DEBUG(@"is called");
    return NO;
}   

But until now I haven't obtained anything. The overrided method is called but there's no soft keyboard. Erica also said the application works by dynamic linking but I don't know how can I accomplish it. I don't need to be in the AppStore because this is a private application so I don't bother about rejection.

Thanks in advance

解决方案

Ok. Finally got it. Many thanks to David, Matthias and Enrico. Here are the steps:

  • import the private framework GraphicsServices
  • call GSEventSetHardwareKeyboardAttached(NO) inside the viewDidLoad
  • add a button that toggles the keyboard by calling

    static void toggleKeyboard(UIKeyboardImpl * keyImpl){
    if (UIKeyboardAutomaticIsOnScreen()) {
        UIKeyboardOrderOutAutomatic();
    } else {
        UIKeyboardOrderInAutomatic();
    }
    

I've found this function on http://code.google.com/p/btstack/wiki/iPhoneKeyboardHiding Now I can take input from the soft keyboard and from the bluetooth device at the same time.

这篇关于显示软键盘(iPad)时连接蓝牙输入设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆