Questions tagged [uiinputviewcontroller]

62 questions
4
votes
1 answer

Current text selection in CustomKeyBoardExtension

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…
Tony
  • 4,311
  • 26
  • 49
3
votes
0 answers

How do I use an inputView with a SwiftUI TextField?

So I've started to learn Swift and made the decision to write my first app using SwiftUI. I would like to use a custom in-app keyboard (another SwiftUI view) to make my app easier to use. But I can't figure out how to do this as i'm a noob and…
3
votes
2 answers

UIInputViewController being dismissed after leaving and returning to view controller

I'm trying to create a custom chat toolbar to display a text view with the message, along with buttons to allow photo selection. I reworked my code this morning to very closely follow this WWDC 2017 talk on text input. The toolbar itself is a…
Joel
  • 43
  • 9
2
votes
1 answer

determine safe area for UIInputViewController from UIScreen.main.bounds

I'm making a custom keyboard with an UIInputViewController. I want to display a xib layout inside a rect. Right now, I determine the correct size of the CGRect, in which I place my xib layout, from UIScreen.main.bounds. However,…
teafortay
  • 21
  • 2
2
votes
0 answers

Want to text input in custom keyboard extension

I'm making ios keyboard extension and it contains view which has a TextField, but I realized this view is keyboard itself... To input text in this TextField, what is the best solution? That's all I can come up with at the moment(I don't know it's…
kazuwombat
  • 1,515
  • 1
  • 16
  • 19
2
votes
1 answer

inputViewController of superview gets called when tapped on subview(UITextView)

I have UIView Subclass to which I have added a UITextField. I have set this view as my Viewcontroller's top view. In the UIViewSubclass, I have overridden inputViewController getter to provide a custom keyboard. When I am selecting the UITextField,…
2
votes
1 answer

viewWillTransition is giving the wrong size

I am making a custom keyboard. I want to generate the keys'(UIButtons) width and height based on the view's width and height. When the keyboard is loaded initially, viewDidAppear correctly determines the height of the view. (375 x 216) override func…
2
votes
1 answer

Add a Clear button functionality in Custom Keyboard using Swift

I use a custom keyboard which contains a delete and a clear button.I can able to delete the letters using this code let obj = UIInputViewController() (obj.textDocumentProxy as UIKeyInput).deleteBackward() Is it any keyword available to clear whole…
Kiran P Nair
  • 2,041
  • 22
  • 31
2
votes
2 answers

Create custom input for UITextField in Swift

I'm programming a iOS app in Swift language and all I have to do is create a custom input for a textfield. I created an additional View Controller with two buttons and what I want is this view controller (instead of the keyboard) to pop-up when I…
2
votes
1 answer

iOS: Is there a performance difference between using playInputClick vs the (1104) sound file with audio toolbox?

Apple recommends using playInputClick in custom keyboards to simulate a click sound. It's easier to implement AudioServicesPlaySystemSound(1104); so my question then becomes, does playInputClick provide better performance or is it the same thing?
2
votes
1 answer

How to programmatically disable predictive view in WebView of iOS 8

I'm designing a custom keyboard for iOS 8. It works fine on any UITextField but when it's in UIWebView, it shows predictions. Since it's allowed to have custom keyboard in iOS 8 I assume there should be a way to disable this view. Any help would be…
Hamid
  • 2,852
  • 1
  • 28
  • 45
1
vote
0 answers

Swift can't read the textDocumentProxy.documentContextBeforeInput after entering a newline

I am typing string text on textDocumentProxy in a custom keyboard app. The input text includes newlines and punctuation letters, but when I try to edit the textDocumentProxy field, the textDocumentProxy.documentContextBeforeInput in case a newline…
1
vote
1 answer

inputAccessoryViewController height modification

I'm trying to use inputAccessoryViewController in my app, but faced a problem with changing height of accessory view. I tried to change frame/bounds of the view, I also tried to handle height of the accessory view using constraints. But nothing…
1
vote
2 answers

iOS Keyboard Extension how to add subview under keyboard

Im making iOs Keyboard extension, now I add animation when user type something like in default iOS keyboard. Something like this: I just move my UIButton layer upper like this: button.layer.position.y = button.layer.position.y -…
Never_be
  • 839
  • 2
  • 10
  • 20
1
vote
1 answer

Custom input view controller

Is it possible to use UIInputViewController subclass as input view on iOS 9? I've tried setting inputViewController property but no custom view controller shows up when my text field becomes a first responder. @interface InputViewController :…
pronebird
  • 12,068
  • 5
  • 54
  • 82