custom-keyboard

Recognize Speech To Text Swift

為{幸葍}努か 提交于 2019-12-06 10:49:34
Is it possible to recognize speech and then convert it into text with custom keyboard. Like by default message app in iphone. Screen Shot 1. Default recognize speech in iphone keyboard. 2. Speech to text Any help would be greatly appreciated. Thanks in advance. I have following code which are used in my sample application to convert speech-to-text. import UIKit import Speech import AVKit class ViewController: UIViewController { //------------------------------------------------------------------------------ // MARK:- // MARK:- Outlets //---------------------------------------------------------

IOS Customkeyboard getting wrong size in Landscape mode

前提是你 提交于 2019-12-06 09:33:08
I am working on custom keyboard. all works perfect but when i rotate the keyboard to landscape mode the keyboard load correctly but it takes the height of portrait mode keyboardview. Here is my Try: @interface KeyboardViewController () { CGFloat expandedHeight ; BOOL isPortrait; } @property(strong,nonatomic)keyboardLayout *ObjKeyLayout; - (void)updateViewConstraints { [super updateViewConstraints]; [self updateCustomHeight]; } -(void)updateCustomHeight { if (self.heightConstraint != nil) { [self.view removeConstraint:self.heightConstraint]; [self.view layoutIfNeeded]; } if(isPortrait) {

Custom keyboard not working in fragment

こ雲淡風輕ζ 提交于 2019-12-06 00:29:16
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: public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

How to add images as text attachment in Swift using nsattributedstring

烈酒焚心 提交于 2019-12-05 20:19:53
问题 I'm trying to build a custom keyboard for iOS using images which I've put in as buttons. When I press a button, the image linked to the button is put into an attributed string which is loaded into an UiTextView inside the custom keyboard view. That is working. The problem is that when I append a new image to the attributed string both the old and new images in the string are changing to the image I currently pressed on. I can't understand why the old images in the string are changing. Any

Open phone settings when button is clicked in my app

亡梦爱人 提交于 2019-12-05 16:58:53
I recently upgraded to Xcode 8 and converted my code to Swift 3. I am making a custom keyboard (extension) which worked perfectly fine till iOS 9, but i am facing a couple of issues in iOS 10. The container app of the custom keyboard contains a button which directs the user to the keyboard settings to add the keyboard Issue: This button click is not working in iOS 10 i.e the user is not directed to the settings. I have configured the URL Schemes in my project and have tried the following code : @IBAction func btnGetStarted(_ sender: AnyObject) { let settingsUrl = URL(string:

Custom keyboard like gif keyboard in android

不想你离开。 提交于 2019-12-05 13:32:36
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

How to detect keyboard type changes with the size, type, suggestion bar height of new keyboard type?

ⅰ亾dé卋堺 提交于 2019-12-05 13:27:44
Is there any way to detect keyboard types changes with the size, type and suggestion bar height, change like from English keyboard to Hindi which contains some kind of suggestion bar (see screenshot). Normal English Keyboard First Problem After changing to Hindi LIPI - When just I changed, everthing is fine because size of english and hindi keyboard is same, but after start typing Hindi Lipi suggestion cover the TextField Second Problem After changing to Emoji - Emoji keyboard hight little bit more as compare to english, So again keyboard cover the TextField . Add an observer for a

When making a custom iOS keyboard extension, how can I create a button that has the same functionality as Apple's original backspace key?

此生再无相见时 提交于 2019-12-05 05:55:43
问题 I am making a customKeyboard which have delete button for delete a text and code for that is: func addDelete() { deleteButton = UIButton.buttonWithType(.System) as UIButton deleteButton.setTitle(" Delete ", forState: .Normal) deleteButton.sizeToFit() deleteButton.setTranslatesAutoresizingMaskIntoConstraints(false) deleteButton.addTarget(self, action: "didTapDelete", forControlEvents: .TouchUpInside) deleteButton.layer.cornerRadius = 5 view.addSubview(deleteButton) var rightSideConstraint =

How can I add button icons to custom keyboard iOS 8?

自作多情 提交于 2019-12-05 02:00:10
问题 I am creating custom keyboard for ios 8. Creating keyboard buttons like this UIButton *aBtn = [ UIButton buttonWithType:UIButtonTypeCustom ]; [aBtn setFrame:CGRectMake(x, 30, btnWidth, btnHeight)]; [aBtn setImage:[UIImage imageNamed:@"A"] forState:UIControlStateNormal]; [aBtn setTitle:@"A" forState:UIControlStateNormal]; [aBtn setTitleColor:[ UIColor blackColor] forState:UIControlStateNormal]; [aBtn setTitleColor:[ UIColor whiteColor] forState:UIControlStateHighlighted]; [aBtn addTarget:self

Determine if a copy to UIPasteboard was successful or not

旧巷老猫 提交于 2019-12-04 19:07:25
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 Full Access is on (not sure how to check this), or determine if the copy to the pasteboard was successful