textdocumentproxy

Is it possible to prevent textDocumentProxy from 'splitting' emoji?

只谈情不闲聊 提交于 2019-12-10 19:24:12
问题 I'm currently working on a third party keyboard for iOS and ran into a small annoyance with textDocumentProxy which I hoped y'all might be able to help me with. So I have the two following variables defined which I am printing to the console - selectedContextAfterInput = textDocumentProxy.documentContextAfterInput selectedContextBeforeInput = textDocumentProxy.documentContextBeforeInput print(selectedContextBeforeInput, selectedContextAfterInput) and a UIPanGesture that

iOS: Custom keyboard: I want to send images to the textDocumentProxy(Input controls)

旧巷老猫 提交于 2019-11-30 12:22:39
问题 I am implementing custom keyboard with only images and wanted to send images to textDocumentProxy/input controls like textview on click of image but not get over it. so far I am able to send text/string to input controls but not images. Is it possible to send images to input controls? Any suggestion or solution is highly appreciated. 回答1: Following is the code for the copy image into pasteboard NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://warp.povusers.org/images

iOS: Custom keyboard: I want to send images to the textDocumentProxy(Input controls)

旧巷老猫 提交于 2019-11-30 02:31:06
I am implementing custom keyboard with only images and wanted to send images to textDocumentProxy/input controls like textview on click of image but not get over it. so far I am able to send text/string to input controls but not images. Is it possible to send images to input controls? Any suggestion or solution is highly appreciated. Following is the code for the copy image into pasteboard NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://warp.povusers.org/images/test.png"]]; UIPasteboard *pasteBoard=[UIPasteboard generalPasteboard]; [pasteBoard setData:data

Custom Keyboard extension with UITextField

老子叫甜甜 提交于 2019-11-29 02:37:44
I have custom keyboard extension with UITextField in it. I am able switch to UITextField 's text input, but cannot switch back to self.textDocumentProxy . Does anybody know, how to do something like [self.textDocumentProxy becomeFirstResponder] ? (By the way, it looks like "GIF Keyboard" app provides such possibility) landonandrey I've implemented next workaround for this: My textFied inherits from UITextField . UserInteraction disabled to prevent it from becomeFirstResponder (because you are not able switch back to system input). I've added blinking UIView as cursor imitation ( blinking

Custom Keyboard extension with UITextField

拥有回忆 提交于 2019-11-27 16:57:08
问题 I have custom keyboard extension with UITextField in it. I am able switch to UITextField 's text input, but cannot switch back to self.textDocumentProxy . Does anybody know, how to do something like [self.textDocumentProxy becomeFirstResponder] ? (By the way, it looks like "GIF Keyboard" app provides such possibility) 回答1: I've implemented next workaround for this: My textFied inherits from UITextField . UserInteraction disabled to prevent it from becomeFirstResponder (because you are not