Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
281 views
in Technique[技术] by (71.8m points)

uiviewcontroller - Invalid capability and invalid name with custom keyboard

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...