Custom -inputView keyboards are not hidden by Bluetooth keyboard
| Originator: | ethicalpaul | ||
| Number: | rdar://17690744 | Date Originated: | 7/15/2014 |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | 5, 6, 7 |
| Classification: | Reproducible: | Always |
Summary: It can be desirable to create a custom keyboard using -inputView in the NSResponder class. It can also be desirable that when the user connects to an external Bluetooth keyboard, that the custom inputView keyboard be automatically hidden like the normal iOS keyboard is. But this does not occur, and there is no legal way to determine when a Bluetooth keyboard is connected. Steps to Reproduce: 1. Set -inputView on an NSResponder object like a UITextField 2. Set the UITextField to be first responder 3. Observe the custom inputView appears 4. Connect a Bluetooth keyboard to the iOS device 5. Observe the custom inputView does not disappear Expected Results: I expected the inputView to hide when the external keyboard was connected, since there is no legal way for my app to sense the keyboard being attached, therefore how I can I hide my custom keyboard myself? Actual Results: My inputView keyboard does not disappear Version: iOS 5, 6, 7 Notes: Ideally, there should be a boolean property on NSResponder that determines if the system should hide my inputView as a result of an external keyboard being connected. Without this option, user experience is being harmed. Here is the email I received as a result of my developer tech support ticket: Hi Paul, You are seeing the expected behavior. When inputView property is set, we assume that you want to handle keyboard all by yourself, so don’t hide the inputView even when hardwdare is connected. There is no supported way to detect if a hardware keyboard is present when inputView is not nil. If you want to hide your inputView when a hardware keyboard is present, you might consider adding something in your UI so that user can do it manually. Configuration: Any iPhone, any iPad
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!