uiinputviewcontroller

Drawing outside UIInputViewController frame

淺唱寂寞╮ 提交于 2019-12-06 03:10:26
问题 Intro: I'm developing a keyboard extension for my native Armenian language. The keyboard's features should look like maximum similar to system default keyboard. One of the features I want to have inside my keyboard is to display Pop-ups on top of the touched buttons, like it is for English keyboard As you can see the pop-up can be drawn outside the keyboard frame Problem: I've managed to draw successfully the pop-up inside the frame of keyboard, but it gets masked to the keyboard frame, i.e.

Current text selection in CustomKeyBoardExtension

余生颓废 提交于 2019-12-05 01:39:15
问题 I'm trying to write Custom Keyboard Extension . I'm looking for the way to know where the cursor is on UITextField , UITextView ...etc in CustomKeyboardExtension ... but I don't see anything like that. I saw SwiftKey app (http://swiftkey.com) can do that (or do something like that). When I change the cursor, suggestion-text will change (see below pictures). Q: How can we get current text selection? ... UPDATE: 29/09/2014 Ok, I'm so foolish. We can use documentContextBeforeInput ,

Current text selection in CustomKeyBoardExtension

落花浮王杯 提交于 2019-12-03 16:25:07
I'm trying to write Custom Keyboard Extension . I'm looking for the way to know where the cursor is on UITextField , UITextView ...etc in CustomKeyboardExtension ... but I don't see anything like that. I saw SwiftKey app ( http://swiftkey.com ) can do that (or do something like that). When I change the cursor, suggestion-text will change (see below pictures). Q: How can we get current text selection? ... UPDATE: 29/09/2014 Ok, I'm so foolish. We can use documentContextBeforeInput , documentContextAfterInput methods of textDocumentProxy property. I thought that "Before","After" are about the

Unable to change UIInputView height

a 夏天 提交于 2019-12-03 12:02:09
I have a simple UIInputViewController subclass with only two overridden methods. I use this input view controller as inputAccessoryViewController on my UIViewController subclass which becomes first responder. I try to specify height of inputView by adding constraint as Apple documentation recommends. Problem is that my constraint doesn't work and I get autolayout exception when my constraint is being added Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. ... ( "<NSLayoutConstraint:0x178aa1d0 V:[UIInputView

Custom Input View in Swift

旧时模样 提交于 2019-12-03 03:37:22
I've spent hours trying to figure out how to create/then get a custom inputView to work. I have a grid of TextInputs (think scrabble board) that when pressed should load a custom inputView to insert text. I've created a .xib file containing the UI elements for the custom inputView . I was able to create a CustomInputViewController and have the inputView appear but never able to get the actual TextInput to update it's value/text . Apple documentation has seemed light on how to get this to work and the many tutorials I've have seen have been using Obj-C (which I have been unable to convert over

Get full string in iOS8 Custom Keyboard Extension

南楼画角 提交于 2019-11-30 01:13:29
I'm creating a Custom Keyboard Extension for iOS 8. I want to get the whole string that the user wrote in the text input field. Unfortunately I stumble in to two main problems: 1) I get null in this callback: - (void)textDidChange:(id<UITextInput>)textInput 2) I only get partial String When I call these methods: - [self.textDocumentProxy documentContextAfterInput]; - [self.textDocumentProxy documentContextBeforeInput]; I want to get the whole string in the text input the user is currently editing what do you suggest i do? Thanks! I found How To. - (void)doSomething{ dispatch_async(inputQueue,

Get full string in iOS8 Custom Keyboard Extension

一笑奈何 提交于 2019-11-28 21:21:58
问题 I'm creating a Custom Keyboard Extension for iOS 8. I want to get the whole string that the user wrote in the text input field. Unfortunately I stumble in to two main problems: 1) I get null in this callback: - (void)textDidChange:(id<UITextInput>)textInput 2) I only get partial String When I call these methods: - [self.textDocumentProxy documentContextAfterInput]; - [self.textDocumentProxy documentContextBeforeInput]; I want to get the whole string in the text input the user is currently

How to detect Orientation Change in Custom Keyboard Extension in iOS 8?

拟墨画扇 提交于 2019-11-27 18:07:57
In Custom Keyboard Extension , we can't use `didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation` and sharedApplication . I need to detect portrait or landscape in keyboard when rotate. How can i detect when orientation change in Custom Keyboard extension? Matt In order to update your custom keyboard when the orientation changes, override viewDidLayoutSubviews in the UIInputViewController . As far as I can tell, when a rotation occurs this method is always called. Additionally, as the traditional [UIApplication sharedApplication] statusBarOrientation] doesn't

How to detect Orientation Change in Custom Keyboard Extension in iOS 8?

谁说胖子不能爱 提交于 2019-11-27 04:16:06
问题 In Custom Keyboard Extension , we can't use `didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation` and sharedApplication . I need to detect portrait or landscape in keyboard when rotate. How can i detect when orientation change in Custom Keyboard extension? 回答1: In order to update your custom keyboard when the orientation changes, override viewDidLayoutSubviews in the UIInputViewController . As far as I can tell, when a rotation occurs this method is always