custom-keyboard

How to add custom notification in iOS Custom Keyboard?

我的梦境 提交于 2019-12-01 05:09:23
问题 I have added Custom Keyboard extension inside my app and running perfect. I have added NSNotification in my keyboard extension class like this: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeKeyboardColor) name:@"keyboard_color" object:nil]; Now I am calling this notification from my view controller class like this: [[NSNotificationCenter defaultCenter] postNotificationName:@"keyboard_color" object:self]; Now I have added my notification selector method in my

ios 8 custom keyboard hold button to delete?

核能气质少年 提交于 2019-12-01 03:39:27
问题 I am currently building a custom keyboard and I am almost done. One problem that I have is with the delete button. When the user taps the delete button, it does what it should do and deletes the previous text entry. However when the user holds the button down, nothing happens. How do I make it so that when the user holds down the delete button, the keyboard continuously deletes like in the standard ios keyboard? This is my current code: pragma mark Keyboards - (void)addGesturesToKeyboard{

IOS Customkeyboard. How to set special character in custom keyboard

蹲街弑〆低调 提交于 2019-11-30 20:56:36
I am working on custom keyboard for iphone 6 and 6Plus. I have develop logic for shift key active - inactive or 123 and abc key . but i want to also display custom symbol like apple keyboard shown. please check in image . currently i am able to change uppercase to lowercase and 123 to abc but how can i set this special character. NOTE:- I searched a lot demo on github but i am not able to see special character in any custom keyboard. Here is my logic for uppercase and ABC-123 Button. -(void)UpparCase:(UIButton*)sender // To make caps or small letter { sender.selected=!sender.selected; if

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

How to play keyboard click sound in custom keyboard?

可紊 提交于 2019-11-30 07:56:37
问题 I had created custom keyboard with UIView . However I didn't hear click sound of keyboard. So I tried following codes.But I can't hear anythings. How can I play that keyboard click sound? NSURL* musicFile = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Tock" ofType:@"aiff"]]; AVAudioPlayer *click = [[AVAudioPlayer alloc] initWithContentsOfURL:musicFile error:nil]; [click setVolume:0.15f]; [click play]; And also I tried next one. AudioServicesPlaySystemSound(0x450); How can I

Check full access for custom keyboard extension

杀马特。学长 韩版系。学妹 提交于 2019-11-30 07:46:37
I need to check full access for custom keyboard extension. I found this link. How to check the "Allow Full Access" is enabled in iOS 8? It say we can check App group. I have app group called "group.TTT.TGroup". It share access between main app and custom keyboard. Then, I check like this. Problem is that I always have access to that (always has array or error = null). Is it because I am sharing same data? But, if my app use another app group and extension use other app group, I can't definitely access to that. May I know how to do? NSFileManager* fileManager = [NSFileManager defaultManager];

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

UITextInputDelegate methods not functioning correctly

帅比萌擦擦* 提交于 2019-11-29 12:41:57
问题 I'm working on iOS 8 custom keyboard extension right now, and there are some issues in using UITextInputDelegate Methods. Does this right: selectionWillChange: and selectionDidChange: methods should be called when user long-presses typing area? And textWillChange: and textDidChange: methods should be called whenever the text is literally changing? Actually, what I observed is that, when I changed selection in text input area, textWillChange: and textDidChange: are called, and I cannot get a

Custom Keyboard - Add multiple emoji icons while long press on keyboard button

﹥>﹥吖頭↗ 提交于 2019-11-29 12:31:32
Anyone having an idea how to create a custom view for multiple emoji icons, while user long press on the keyboard. You can find all the details and some raw Obj-C code here (gist) . The code isn't complete but enough to start. Here only draw background image code: - (UIImage*)hintImage { CGMutablePathRef path = CGPathCreateMutable(); CGPoint p = CGPointMake(__PADDING_X, __PADDING_Y); CGPoint p1 = CGPointZero; CGPoint p2 = CGPointZero; //1 p.x += __PAN_UPPER_RADIUS; CGPathMoveToPoint(path, NULL, p.x, p.y); NSUInteger hintCount = [self.hintSymbolsList count]; //!!!:magic numbers self

Add Stickers in Custom KeyBoard Extension

妖精的绣舞 提交于 2019-11-29 08:48:20
I am looking to create a Custom Keyboard for iPhone,iPad. I have successfully integrated Phrases and Emoticons into the Keyboard, But couldn't get any idea how to add stickers in the keyboard. Anyone knows how to add ? Thanks. I recently created a custom keyboard for sending stickers on iPhone. I noticed this question is tagged as Objective-C but I will be responding in Swift since that’s how I did it. If I am understanding your question correctly, “add stickers in the keyboard” may refer to stickers similar to those on Facebook Messenger or Peach. My personal inspiration came from wanting to