Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lag When Activating Text Field Inside iOS 8 Custom Keyboard

I want to add a search field inside my custom keyboard that allows the user to search for content which can then be input into the main text document for which the keyboard is being displayed.

However, calling -becomeFirstResponder on the UITextField object causes a 3-4 second lag during which no input is accepted. The same thing happens if I call -resignFirstResponder. I can set the text property of the text field just fine, but that means that there is no caret, and the text is truncated to fit.

On calling (become|resign)FirstResponder, I get the following messages in the log:

2014-10-28 13:39:50.920 Giffy KB[2073:514844] Received 0 images

2014-10-28 13:39:57.942 Giffy KB[2073:514745] <_UIRemoteInputViewController: 0x14762a030> timed out waiting for fence barrier from com.theappical.giffage.giffagekb

2014-10-28 13:39:58.446 Giffy KB[2073:514745] View service did not balance fencing 'begin' messages with 'end' messages within a second; timing out.```

Other third party keyboards seem not to use textfields (they use custom views instead). Does that mean this is a bug at Apple's end, or is there something I can do to resolve it?

like image 489
caughtinflux Avatar asked Oct 20 '22 23:10

caughtinflux


1 Answers

Filed a bug report with Apple for the same, ended up faking a text field using a UILabel. As of now (iOS 8.1 latest), this issue has yet to be resolved.

like image 182
caughtinflux Avatar answered Nov 02 '22 08:11

caughtinflux