custom-keyboard

How to clear emoji font cache in iOS application (keyboard extension)

核能气质少年 提交于 2019-12-08 06:51:12
问题 Keyboard extension in iOS is memory limited, when the memory cost is above 50+M, keyboard process will be killed. However, when I am developing the emoji panel in keyboard extension, the emoji panel has to render 800+ emoji icons. From this How to clear font cache filled with emoji characters? I know that, keyboad has to spend 10M memory for emoji rendering for the hundreds emoji icons. So I have two questions here: how the iOS system draw the emoji icons, why they have to be converted to png

iOS AlertView App Extension

流过昼夜 提交于 2019-12-08 03:56:31
问题 I'm working in a custom keyboard (iOS App Extension) . I have a UICollectionView in my Keyboard Layout , so when one item is selected I want to show a message ( UIAlerView for example). Here is my code: - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ ... UIAlertController * alert= [UIAlertController alertControllerWithTitle:@"My Title" message:@"Enter User Credentials" preferredStyle:UIAlertControllerStyleAlert]; [self

How to add toolbar above iOS8 custom keyboard?

若如初见. 提交于 2019-12-07 19:51:00
问题 My problem is write picture. I really need you help. Maybe inputAccessoryView, inputAccessoryViwController can be used, but I really have no idea. Thanks so much! 回答1: You can adjust the height of your custom keyboard’s primary view using Auto Layout. By default, a custom keyboard is sized to match the system keyboard, according to screen size and device orientation. A custom keyboard’s width is always set by the system to equal the current screen width. To adjust a custom keyboard’s height,

Custom keyboard not working in fragment

时间秒杀一切 提交于 2019-12-07 15:33:04
问题 I have implemented my own custom keyboard in a fragment. The keyboard opens when i click the editText. But all the number keys are not working, some keys like 7, 0 and 8 works onclicking but most of the time it doesn't. keys like enter, right and left are working correctly. The same code works absolutely fine in Activity but its not working when implemented in Fragment. And also onFocus Listerner is not being called in this fragment. What would be reason? The code I implemented is as follows:

Custom keyboard like gif keyboard in android

*爱你&永不变心* 提交于 2019-12-07 12:23:07
问题 I'm developing a custom Android keyboard like gif keyboard(https://play.google.com/store/apps/details?id=bo.pic.android.keyboard&hl=ko). When i click a specific button, I want to change to A view. I cannot find a way to change to A view. Or is it not A view? 来源: https://stackoverflow.com/questions/32395655/custom-keyboard-like-gif-keyboard-in-android

Proper implementation of handleInputModeList in Custom Keyboard

↘锁芯ラ 提交于 2019-12-07 09:18:27
A new API has been added in iOS 10 to present the list of other keyboards the user can switch to - the same list that appears when users long press the globe on a system keyboard. The declaration of the function is as follows: func handleInputModeList(from view: UIView, with event: UIEvent) My question is, what's the proper way to generate a UIEvent to supply? I was planning to call this function using a UILongPressGestureRecognizer but this API doesn't reveal UIEvent s. I was going about this the wrong way. No need for custom gesture handling. As noted in the headers, one should add a target

iOS AlertView App Extension

假如想象 提交于 2019-12-06 21:46:32
I'm working in a custom keyboard (iOS App Extension) . I have a UICollectionView in my Keyboard Layout , so when one item is selected I want to show a message ( UIAlerView for example). Here is my code: - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ ... UIAlertController * alert= [UIAlertController alertControllerWithTitle:@"My Title" message:@"Enter User Credentials" preferredStyle:UIAlertControllerStyleAlert]; [self presentViewController:alert animated:YES completion:nil]; } I get this error: 'Feature not available in extensions

Can't see custom keyboard in Safari of iOS8.1 simulator

℡╲_俬逩灬. 提交于 2019-12-06 19:07:59
问题 After update to Xcode 6.1, I lost my custom keyboard in Safari of iOS8.1 simulator. But it's still come in photo app. Photo app can switch to my custom keyboard, but Safari still display English and Emoji, other system keyboard like Arabic also not work. I reset simulator but not work. It's look nothing change in Safari in iOS8.1.I try to clear DerivedData folder but it no help. I remove Xcode and reinstall from Appstore, not work too. I must test on my device, too strange. Does anyone have

How to add toolbar above iOS8 custom keyboard?

…衆ロ難τιáo~ 提交于 2019-12-06 14:29:28
My problem is write picture. I really need you help. Maybe inputAccessoryView, inputAccessoryViwController can be used, but I really have no idea. Thanks so much! You can adjust the height of your custom keyboard’s primary view using Auto Layout. By default, a custom keyboard is sized to match the system keyboard, according to screen size and device orientation. A custom keyboard’s width is always set by the system to equal the current screen width. To adjust a custom keyboard’s height, change its primary view's height constraint. The following code lines show how you might define and add such

Determine if a copy to UIPasteboard was successful or not

别等时光非礼了梦想. 提交于 2019-12-06 12:35:51
问题 I'm programmatically copying an image to the UIPasteboard, and I want to determine if the copy was successful or not. Specifically, I'm creating an custom keyboard on iOS 8, where some of the keys will copy an image to the pasteboard for the user to paste in a textfield. UIPasteboard *pasteBoard = [UIPasteboard generalPasteboard]; [pasteBoard setImage:[UIImage imageNamed:anImage]]; To do this, the user must allow "Full Access" on the keyboard. So I either have to have a way to determine if