本文介绍了IOS在没有辞职急救人员的情况下解雇/显示键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我的应用程序与通过蓝牙连接的条形码扫描仪一起使用。连接扫描仪后,您可以双击扫描仪上的按钮以关闭/显示屏幕键盘。 90%的用户希望隐藏键盘,因为他们将扫描条形码以输入数据。我提前知道有一些例外情况需要启用键盘,我想省下他们按下扫描仪按钮调出键盘的工作,而是强迫键盘出现。My application is used with a barcode scanner connected via Bluetooth. When the scanner is connected you can double tap a button on the scanner to dismiss/show the on screen keyboard. 90% of the time the user will want the keyboard to be hidden as they will be scanning a barcode to input data. There are a few exceptions that I know of ahead of time that the keyboard will need to be enabled, I would like to save them the effort of pressing the scanner button to bring up the keyboard and instead force the keyboard to show up.扫描仪不使用resignfirstresponder来关闭键盘,这很明显,因为光标仍然可见,扫描条形码会将数据输入当前文本字段。The scanner does not use resignfirstresponder to dismiss the keyboard, this is evident because the cursor is still visible and scanning a barcode will input data into the current text field.有没有人知道如何在不使用resignfirstresponder的情况下解雇/显示屏幕键盘?Does anyone know how to dismiss/show the on screen keyboard without using resignfirstresponder?供参考我使用此扫描仪 http://ww1.socketmobile。 com / products / bluetooth-scanners / how-to-buy / details.aspx?sku = CX2864-1336For reference I am using this scanner http://ww1.socketmobile.com/products/bluetooth-scanners/how-to-buy/details.aspx?sku=CX2864-1336推荐答案要在视图中完全结束编辑,您可以使用以下内容To end editing completely in the view you can use the following[self.view endEditing:YES];这将在视图中为您移除键盘。This will remove the keyboard for you in the view. 这篇关于IOS在没有辞职急救人员的情况下解雇/显示键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-19 21:40