inputview

How to stop my Custom Keyboard from 'floating' or being undocked on iPad

旧巷老猫 提交于 2019-12-05 00:59:21
I have a custom Keyboard that gets displayed for a certain UITextField when I set the textField's inputView to my KeyboardView. The keyboard works fantastically well but it has become apparent that the keyboard will 'float' if the user has previously undocked the built in Apple Keyboard or indeed split it. I have searched for many hours for a way to ensure my custom keyboard does not act like this and instead stays docked to the bottom of the screen regardless as to whether the user has previously undocked the built in Apple Keyboard. self.keyboardInputView = [[[KeyboardInputViewController

iOS UITextField- dismissing custom inputView

时光怂恿深爱的人放手 提交于 2019-12-04 04:53:43
I am using a custom inputView for some textfield, however when i call resignFirstResponder on the textfield, the custom input view does not dismiss...any suggestions? UITextField *f=[[UITextfield alloc] init]; UIView *view=[[UIView alloc] initWithFrame..]; [f setInputView:view]; //random example of how to set a textfields input view to a custom view After some research, this issue only occurs when working with a viewController thats presented in a modal view...it works ok otherwise... Thanks -Daniel Instead of calling resignFirstResponder , you should call endEditing: on the view itself or any

iOS - Dismiss UIDatePicker presented as inputView

感情迁移 提交于 2019-12-01 17:36:44
I have a text field in my UI that when it's selected presents a UIDatePicker instead of the default keyboard, how could I set up a button as to dismiss the picker when the user is done? What I do is have my inputView as a custom view which contains a UIDatePicker and a toolbar above it with a 'Done' button wired up to a method that calls a delegate method to tell the object that owns the UITextField to dismiss the "keyboard" by calling resignFirstResponder . Create a UIView (namely customDatePickerView) and in that view ,create datepicker and a done button and a cancel button in the xib. In

Custom InputView for UISearchBar doesn't work in iOS7

♀尐吖头ヾ 提交于 2019-11-30 23:42:13
I need to set my custom inputView in UISearchBar. So i wrote following codes , that is working perfectly in iOS5 and iOS6 . However it doesn't work in iOS7. for(int i =0; i<[self.searchBar.subviews count]; i++) { if([[self.searchBar.subviews objectAtIndex:i] isKindOfClass:[UITextField class]]) { [(UITextField*)[searchBar.subviews objectAtIndex:i] setFont:[UIFont fontWithName:@"MyCustomFont" size:15]]; UITextField* search=(UITextField*)[searchBar.subviews objectAtIndex:i]; search.delegate = self; [(UITextField*)[self.searchBar.subviews objectAtIndex:i] setInputView:self.customKeyboard]; [self

Custom inputView for UITextField , how do I direct input back to the text field?

可紊 提交于 2019-11-30 02:07:22
I have set a custom inputView to my UITextField . I need a way to display the data selected in my custom inputView in the UITextfield . I would like to achieve this the same way the system keyboard does it. Does anyone know how this is done? How does the system keyboard get a reference to the UITextfield that is the first responder? How does the system keyboard get a reference to the UITextfield that is the first responder? It just asks the system for the first responder; unfortunately, that's a private UIKit method (or was, last I checked). You can find the first responder by recursing

How do I retrieve keystrokes from a custom keyboard on an iOS app?

自古美人都是妖i 提交于 2019-11-27 07:19:34
I need to build a custom keyboard for my iPhone app. Previous questions and answers on the topic have focused on the visual elements of a custom keyboard, but I'm trying to understand how to retrieve the keystrokes from this keyboard. Apple provides the inputView mechanism which makes it easy to associate a custom keyboard with an UITextField or UITextView, but they do not provide the functions to send generated keystrokes back to the associated object. Based on the typical delegation for these objects, we'd expect three functions : one of normal characters, one for backspace and one for enter

How do I retrieve keystrokes from a custom keyboard on an iOS app?

老子叫甜甜 提交于 2019-11-26 13:08:02
问题 I need to build a custom keyboard for my iPhone app. Previous questions and answers on the topic have focused on the visual elements of a custom keyboard, but I\'m trying to understand how to retrieve the keystrokes from this keyboard. Apple provides the inputView mechanism which makes it easy to associate a custom keyboard with an UITextField or UITextView, but they do not provide the functions to send generated keystrokes back to the associated object. Based on the typical delegation for