ios远程键盘窗口 [英] ios remote keyboard window
问题描述
在iOS 9中,我看到一个新窗口出现在我的应用程序中,这是我之前从未见过的.图片如下.从视图树的角度出发,我怀疑它可能来自UIRemoteKeyboardWindow,但是我不知道.这是什么,我该怎么做才能使其不出现?
In iOS 9, I see a new window appearing in my app that I didn't see before. An image is below. From walking the view tree, I suspect it may be coming from the UIRemoteKeyboardWindow -- but I don't know that. What is it, and what do I have to do to keep it from appearing?
正如评论者所指出的那样,它与inputView(即键盘)相关联.我不想使用键盘,因此可以通过调用来禁用它
As a commenter pointed out, this is tied to the inputView, i.e. the keyboard. I don't want a keyboard and so disabled it by calling
self.inputView = [[UIView alloc]initWithFrame: CGRectZero];
那确实杀死了键盘,但是仍然有配件.我尝试过类似的技巧来杀死配件.他们都没有工作.调用self.inputAccessoryView返回nil,这无济于事.
That did kill the keyboard, but there is still the accessory. I've tried similar tricks to kill the accessory; none of them have worked, yet. Calling self.inputAccessoryView is returning nil, which doesn't help.
推荐答案
您可以使用以下代码:
textField.inputAssistantItem.leadingBarButtonGroups = [[NSArray alloc] init];
textField.inputAssistantItem.trailingBarButtonGroups = [[NSArray alloc] init];
上面使用的textField是您点击以对其进行编辑的textField.
the textField use above is the textField which you tap to edit.
这篇关于ios远程键盘窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!