Invalid capability and invalid name with custom keyboard

試著忘記壹切 提交于 2019-12-12 02:26:27

问题


I've designed a custom keyboard for the use of my own application only. That's why in fact, I didn't use UIInputViewController but only UIViewController (and set a delegate to the custom text field which is actually a subclassed UIScrollView). When I call becomeFirstResponder() on my text field, it takes incredibly long (not only the first time but each time I call this function) until the keyboard actually appears (around 2 seconds). Furthermore I get the following error messages:

_BSMachError: (os/kern) invalid capability (20)
_BSMachError: (os/kern) invalid name (15)

I don't know where these error logs are coming from, the only thing I can tell is that if I don't set my custom view controller's view as the inputView of my text field but a built-in UIView subclass like UISlider I get neither any delay nor any error message.

I would really appreciate any hint or solution to this problem, thanks in advance.

BTW: I'm using Xcode 7.0 official release and iOS 9.0.2 with Swift 2.0 - the delay occurs on the simulator as well as on the device in both debug and release mode, debug executable switched on or off


回答1:


In my case the problem was finally resolved by removing some constraints (that were actually valid and did what they were supposed to), however I don't think that's a general solution to this awkward error message.



来源:https://stackoverflow.com/questions/33202827/invalid-capability-and-invalid-name-with-custom-keyboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!