custom-keyboard

Load a nib file to act as a custom keyboard when a UITextField is tapped

余生颓废 提交于 2019-12-23 17:59:54
问题 I'm trying to load a .xib file to act as a custom keyboard when a textField is tapped. I'm able to show the .xib file (view) when the textField is tapped but I'm not sure how to communicate the buttons in the .xib file with the a textField in the ViewController.swift . This is what I have done so far. Created a single project. Added a UITextField and created an outlet for it. @IBOutlet weak var myField: MyTextField! Created a new .xib file and called it CustomView.xib . Created a new class

Incorrect Keyboard Extension height after rotation

狂风中的少年 提交于 2019-12-23 04:54:22
问题 I have iOS custom keyboard that changes height when it rotates. My code works fine 95% times... But in some cases (see below) the height is not changed when rotated to landscape - portrait height is kept. Issue can be reproduced with this (almost) minimal code - create new Keyboard Extension target and copy this code to KeyboardViewController : class KeyboardViewController: UIInputViewController { private var orangeView = UIView() private var heightConstraint: NSLayoutConstraint! @IBOutlet

Setting keyPreviewLayout for android virtual keyboard is causing a crash

僤鯓⒐⒋嵵緔 提交于 2019-12-23 00:53:29
问题 I have a custom virtual keyboard in android which appears when a button is clicked. If i set a keyPreviewLayout with the statement android:keyPreviewLayout="@layout/mykeypreviewlayout" and include some layout statements in res/layout/mykeypreviewlayout.xml at runtime, when a key on the custom soft keyboard is touched, the app crashes. Here are the code snippets: The following is from the main xml file. <LinearLayout android:layout_height="wrap_content" android:layout_gravity="bottom" android

Setting keyPreviewLayout for android virtual keyboard is causing a crash

天涯浪子 提交于 2019-12-23 00:53:16
问题 I have a custom virtual keyboard in android which appears when a button is clicked. If i set a keyPreviewLayout with the statement android:keyPreviewLayout="@layout/mykeypreviewlayout" and include some layout statements in res/layout/mykeypreviewlayout.xml at runtime, when a key on the custom soft keyboard is touched, the app crashes. Here are the code snippets: The following is from the main xml file. <LinearLayout android:layout_height="wrap_content" android:layout_gravity="bottom" android

Recognize Speech To Text Swift

穿精又带淫゛_ 提交于 2019-12-22 17:16:49
问题 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. 回答1: 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 { //----------------------------------------------------------

How do I send audio file send via iMessage ios 8

别来无恙 提交于 2019-12-22 07:15:08
问题 As we know with the launch of ios 8 the apple allow custom Keyboard extension.In keyboard extension we can send images,gif etc in SMS by using Copy image to clipboard.code UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; NSData *data= UIImagePNGRepresentation([UIImage imageNamed:@"so_close_disappointed_meme.png"]); [pasteboard setData:data forPasteboardType:@"public.png"]; Now i am trying to send audio file in iMessage like this feature reference.don't know apple will allow us to

ERROR ITMS-9000: "Invalid architecture: Apps that include an app extension and a framework must support arm64

天涯浪子 提交于 2019-12-21 03:49:30
问题 I want to upload build with Custom keyboard extension on Itunes Connect But when I am going to upload it on Itunes Connect through Application loader its show me following error ERROR ITMS-9000: "Invalid architecture: Apps that include an app extension and a framework must support arm64 I have added valid architecture to "Armv7",armv7s,arm64 in keyboard extension target and app target as well.but I am still facing same problem 回答1: Please check your embedded frameworks, if any. I've faced the

how can I create and access share app group document directory?

两盒软妹~` 提交于 2019-12-20 07:40:46
问题 i am using custom keyboard extension then download keyboard theme from server and save in to app document directory but app document directory can not access in custom keyboard extension so, required to share app group directory. how can i do please help me. Now i am trying this but its not working. let fileManager = FileManager.default if let directory = fileManager.containerURL(forSecurityApplicationGroupIdentifier: "group.companyname.appname") { //let newDirectory = directory

Custom keyboard height is more than default keybaord

微笑、不失礼 提交于 2019-12-20 04:13:31
问题 How to do the custom size of keyboard like what gBoard did in their keyboard (see the screenshot). Here the search section is showing above the keyboard. I want to do the same in my application. Is anybody can help me to know which method is using to create such a view. 回答1: You should look at the inputAccessoryView property. Since it is a property on UIResponder , it is available on UITextView , UITextField and others. Assigning your custom view to inputAccessoryView will make it appear on

How to detect if ios8 custom keyboard extension is running in not iphone 6 optimized app?

柔情痞子 提交于 2019-12-19 08:55:23
问题 In the app that not optimized for iphone 6 in standard display mode keyboard and status bar shows zoomed. This causes my manually layouted custom keyboard extension to show streched. How can I detect this zooming to fix layout? 回答1: Use self.view.frame.size.width It returns 320 for zoomed mode & 414 for regular mode on my 6+ (hopefully on 6 also) in - (void)updateViewConstraints 回答2: Eventually you will not need to do this as whatsapp and other apps get updated (I believe whatsapp just did)