问题
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