Questions tagged [uikeyboard]

uikeyboard is an iOS object used to represent a keyboard. Implementors use it to create an interface which approximates a physical keyboard

uikeyboard
Filter by
Sorted by
Tagged with
1792 votes
99 answers
652k views

How can I make a UITextField move up when the keyboard is present - on starting to edit?

With the iOS SDK: I have a UIView with UITextFields that bring up a keyboard. I need it to be able to: Allow scrolling of the contents of the UIScrollView to see the other text fields once the ...
509 votes
45 answers
503k views

Close iOS Keyboard by touching anywhere using Swift

I have been looking all over for this but I can't seem to find it. I know how to dismiss the keyboard using Objective-C but I have no idea how to do that using Swift? Does anyone know?
lagoon's user avatar
  • 6,487
348 votes
44 answers
294k views

Move view with keyboard using Swift

I have an app that has a text field on the lower half of the view. This means that when I go to type in the text field the keyboard covers the textfield. How would I go about moving the view upwards ...
Alex Catchpole's user avatar
192 votes
22 answers
200k views

How do you dismiss the keyboard when editing a UITextField

I know that I need to tell my UITextField to resign first responder when I want to dismis the keyboard, but I'm not sure how to know when the user has pressed the "Done" key on the keyboard. Is there ...
kubi's user avatar
  • 48.8k
183 votes
12 answers
176k views

Programmatically change UITextField Keyboard type

Is it possible to programmatically change the keyboard type of a uitextfield so that something like this would be possible: if(user is prompted for numeric input only) [textField setKeyboardType: ...
eric.mitchell's user avatar
139 votes
13 answers
156k views

How to get height of Keyboard?

The height of a keyboard on varying iOS devices is different. Does anybody know how I can get height of a device's keyboard programmatically?
Lachtan's user avatar
  • 4,942
107 votes
14 answers
118k views

How to make return key on iPhone make keyboard disappear?

I have two UITextFields (e.g. username and password) but I cannot get rid of the keyboard when pressing the return key on the keyboard. How can I do this?
K.Honda's user avatar
  • 3,106
106 votes
29 answers
92k views

Dismiss keyboard by touching background of UITableView

I have a UITableView with UITextFields as cells. I would like to dismiss the keyboard when the background of the UITableView is touched. I'm trying to do this by creating a UIButton the size of the ...
Hua-Ying's user avatar
  • 3,166
97 votes
21 answers
54k views

UI Test deleting text in text field

In my test I have a text field with a pre-existing text. I want to delete the content and type a new string. let textField = app.textFields textField.tap() // delete "Old value" textField.typeText("...
Tomasz Bąk's user avatar
  • 6,184
86 votes
16 answers
111k views

Allow only Numbers for UITextField input

The iPad does not have a "Numpad" keyboard like the iPhone/iPod does. I'm looking to find how I can restrict the user's keyboard to only accept values 0 through 9. I would imagine using UITextField'...
Demasterpl's user avatar
  • 2,123
85 votes
12 answers
63k views

Getting keyboard size from userInfo in Swift

I have been trying to add some code to move my view up when the keyboard appears, however, I am having issues trying to translate the Objective-C examples into Swift. I have made some progress, but I ...
user3746428's user avatar
  • 11.1k
69 votes
6 answers
78k views

dismiss keyboard with a UITextView

I am sure this is not that difficult, but I am having trouble finding info on how to dismiss a keyboard with the return/done key using a textview, not a textfield. here is what I have tried so far(...
user3708224's user avatar
  • 1,249
69 votes
2 answers
7k views

HW kbd Failed to set (null) as keyboard focus ios

In my iOS app crash log I found this statement: HW kbd Failed to set (null) as keyboard focus ios Does anyone know what is this and how to resolve it?
Waris Shams's user avatar
  • 1,604
63 votes
19 answers
84k views

How to dismiss keyboard when touching anywhere outside UITextField (in swift)?

I'm working on a project that have a UIViewController, on the view controller there is a UIScrollView and a UITextField on the scrollview. like this: I'm trying to dismiss the keyboard and hide it ...
White Hat's user avatar
  • 681
62 votes
3 answers
48k views

Change text of "Return" keyboard button

How can I change the standard text of the "Return" button to something else? I want it to be "Add".
Ilya Suzdalnitski's user avatar
54 votes
5 answers
22k views

InputAccessoryView docked at bottom

I'm trying to achieve similar positioning behavior as the bottom text input bar in Apple's Messages app. I have tried many approaches, searched high and low and there are many similar questions but ...
Stian Høiland's user avatar
51 votes
9 answers
46k views

UIKeyboardBoundsUserInfoKey is deprecated, what to use instead?

I'm working on an iPad app using 3.2 sdk. I'm dealing with obtaining the keyboard size to prevent my textfields from hidding behind it. I'm getting a Warning in Xcode -> UIKeyboardBoundsUserInfoKey ...
Mikeware's user avatar
  • 867
50 votes
8 answers
47k views

How to add done button on keyboard on top of keyboard in IOS?

I want to add the Done button on the top of keyboard on right side in iOS for a textView.Please tell me how can i do that? I want to achieve something similar to the above keyboard
TechChain's user avatar
  • 8,654
48 votes
7 answers
37k views

in iOS8 using .focus() will show virtual keyboard and scroll page after touch

Prior to iOS8, using the Javascript .focus() method on an input element would appear to have no effect (the virtual keyboard would not display). After the latest iOS 8 release, running the .focus() ...
Mac's user avatar
  • 1,057
44 votes
6 answers
34k views

It is possible to show keyboard without using UITextField and UITextView iphone app?

I am working in iPhone messaging based app. I want to show keyboard with keyboard inputAccessoryView in keyboard without using UITextView and UITextField. It is possible to do this? Please any one ...
Gopinath's user avatar
  • 5,412
39 votes
4 answers
7k views

iOS - How can I preload the keyboard?

The Problem In most iPhone apps, there's a quite a bit of delay the first time that the keyboard is presented (presumably creating the keyboard takes quite a bit of oomph, even on an iPhone 4). ...
Jordan Smith's user avatar
  • 10.4k
38 votes
5 answers
12k views

Leaving inputAccessoryView visible after keyboard is dismissed

What I'm trying to do is to create something similar to the "find on page" search function in Safari on iPad. I'm using a UIToolbar with some items in it and attached it to the keyboard by setting it ...
Tom van Zummeren's user avatar
35 votes
4 answers
19k views

Autolayout Constraint - Keyboard

Im stuck trying to animate a table view smoothly which has an autolayout contraint. I have a reference to the constraint "keyboardHeight" in my .h and have linked this up in IB. All i want to do is ...
Marty W's user avatar
  • 415
30 votes
4 answers
40k views

Numeric keyboard with decimal

I´m building an app with equations and I have used a numeric keyboard but I want to have a decimal slot on it. The default is only numbers. How do you add a decimal input on that keyboard? This is ...
Kevin's user avatar
  • 365
28 votes
3 answers
17k views

Convert UIKeyboardFrameEndUserInfoKey to View or Window Coordinates

For the constant UIKeyboardFrameEndUserInfoKey, in the Apple docs it says: These coordinates do not take into account any rotation factors applied to the window’s contents as a result of ...
Ser Pounce's user avatar
  • 14.3k
28 votes
6 answers
20k views

Is there a way to prevent the keyboard from dismissing?

I realize that this is the inverse of most posts, but I would like for the keyboard to remain up even if the 'keyboard down' button is pressed. Specifically, I have a view with two UITextFields. With ...
PengOne's user avatar
  • 48.3k
26 votes
5 answers
12k views

UIView atop the Keyboard similar to iMessage App

currently I'm attempting to basically implement and exact copy of Apples iMessage App. That means I need a UITextView that is docked at the bottom of the screen, and moves up when it becomes ...
pkluz's user avatar
  • 4,871
25 votes
3 answers
19k views

iOS7 Keyboard Return/Done/Search tint colour

With the new iOS7 UIView tint color it becomes pretty easy to theme an entire app quickly. It even changes the color of the text caret when editing UITextFields. However, the keyboard's bottom right '...
Tyson's user avatar
  • 14.7k
25 votes
1 answer
3k views

Has anyone found a good way of using the new iOS5 keyboard events?

During development of a recent feature for my iPad app, I realized that the new iOS5 keyboard docking/splitting behavior was causing huge issues. I use an inputAccessoryView for the keyboard with a ...
TahoeWolverine's user avatar
24 votes
7 answers
25k views

How to show button ‘Done’ on number pad on iPhone OS 4? [duplicate]

I'd like to add a Done button to the iPhone number pad keyboard. There's even a handy space at the bottom left for just such a button. Previously, I was using a similar trick to those described in ...
Will Harris's user avatar
  • 21.7k
24 votes
2 answers
28k views

Can't find keyplane that supports type 4 for keyboard iPhone-Portrait-NumberPad

I recently upgraded to Xcode 7 and today I noticed this warning in the log when I tapped a text field and the keyboard popped up: Can't find keyplane that supports type 4 for keyboard iPhone-...
Alex Craciun's user avatar
24 votes
1 answer
833 views

iOS "Gboard" app, UIKeyboard notification height is wrong or invalid

I'm trying to move the view up when the keyboard pops up over the UITextfield which is placed on UIScrollView. I'm using UIKeyboardWillShowNotification and UIKeyboardWillHideNotification for this. ...
arthankamal's user avatar
  • 6,391
23 votes
3 answers
10k views

iOS 8 keyboard hides my textview

I have a UIViewController presented using self.accountViewController.modalPresentationStyle = UIModalPresentationFormSheet; and now in iOS 8 the last UITextView is hidden from the keyboard when it ...
Alessio Crestani's user avatar
20 votes
2 answers
20k views

Action of the "Go" button of the ios keyboard

How do I bind an action to the Go button of the keyboard in iOS ?
Alexis's user avatar
  • 16.7k
20 votes
3 answers
14k views

Change the iOS keyboard layout to emoji?

Is it possible to change the keyboard layout to emoji when a UITextField becomes the first responder ? or according to a user action like tapping a UIButton I know that i can change the keyboard ...
ahmad's user avatar
  • 1,222
19 votes
3 answers
25k views

How to detect UIKeyboard "backspace" button touch on UITextField? [duplicate]

How can i detect backspace button pressed on UIKeyboard? thanks EDIT: Is there any keyboard delegate that returns key pressed value?
elp's user avatar
  • 8,091
19 votes
2 answers
10k views

UITextField and Keyboard Notifications - strange order

So I've set up a notification for the keyboard appearance event. Now let us consider a UITextView and a UITextField. [[NSNotificationCenter defaultCenter] addObserver:self ...
Bourne's user avatar
  • 10.2k
19 votes
2 answers
4k views

Custom Keyboard: Hub connection error

recently I was playing around with the custom keyboard extension in iOS 8 Beta with Swift (Xcode beta 6), but I keep getting this error when I run it on a simulator, it seems to be quite random and I'...
niclas's user avatar
  • 710
18 votes
5 answers
12k views

UIKeyboardDidShowNotification called multiple times, and sometimes with incorrect keyboard dimensions

I am trying to move a UITextView above the keyboard whenever the keyboard appears/changes. Let's say I have the English keyboard displaying and then switch directly to the Chinese keyboard (which is ...
Benny B's user avatar
  • 367
17 votes
2 answers
16k views

How to enable the "return button" in a UITextField keyboard?

When I start editing a UITextField, I have the "Clear When Editing Begins" option checked so it starts off with no text. However, the "Return" button is grayed out until you type ...
peter61's user avatar
  • 279
17 votes
1 answer
11k views

iOS 13 Xcode how to remove QuickType on UIKeyboard ( auto complete / auto suggest ) [duplicate]

UIKeyboard with QuickType! It is bad to know that there is no sufficient space of screen on iPhone devices, now apple has been taken more room by adding QuickType. How can I remove it for items ...
Mike Zriel's user avatar
  • 1,665
17 votes
1 answer
620 views

-[_NSObserverList setCursorPosition:]

I am getting #560 NSInvalidArgumentException error as shown below; -[_NSObserverList setCursorPosition:]: unrecognized selector sent to instance 0x1702a6ea0 CoreFoundation ___exceptionPreprocess ...
最光阴's user avatar
  • 181
16 votes
4 answers
20k views

iPad keyboard dimensions

I have found the iPhone's keyboard bounds in the apple documentation, but I can't find the iPad's keyboard bounds. Could you please help me?
Infinite Possibilities's user avatar
16 votes
7 answers
14k views

How to display UIView over keyboard in iOS

I want to create a simple view over keyboard, when users tap "Attach" button in inputAccessoryView. Something like this: Is there an easy way to do it? Or i should create my custom keyboard?
pavel_s's user avatar
  • 485
16 votes
1 answer
3k views

How to detect user is mid-way inputting with an Input Method?

If user is inputting in a UITextView using an Input Method such as Chinese Pinyin, there is a state where the Pinyin is already displayed in tne text view but user is still yet to choose the final ...
an0's user avatar
  • 17.4k
16 votes
9 answers
15k views

UITextView cursor below frame when changing frame

I have a UIViewCOntrollerthat contains a UITextView. When the keyboard appears I resize it like this: #pragma mark - Responding to keyboard events - (void)keyboardDidShow:(NSNotification *)...
Anders's user avatar
  • 2,913
16 votes
2 answers
2k views

UIKeyboard will change frame with interactive keyboard dismiss, not called continuously

I am trying to use the UITableView.keyboardDismissMode = UIScrollViewKeyboardDismissMode.Interactive, to be able to drag my keyboard up and down. However I can't find any way to track the keyboard ...
TimWhiting's user avatar
  • 2,445
15 votes
1 answer
13k views

Bringing up a UIPickerview rather than keyboard input iOS

Basically I would like to have the user click in the text field and it bring up a populated pickerview rather than a keyboard. This would also need a toolbar with a done button as well Im presuming. I ...
JohnV's user avatar
  • 285
15 votes
2 answers
9k views

Animate UIView along keyboard appear animation

I am using UIKeyboardWillShowNotification and UIKeyboardWillHideNotification to animate a view along the keyboard appear animation using UIKeyboardAnimationDurationUserInfoKey, ...
Sascha Manuel Hameister's user avatar
15 votes
2 answers
6k views

Synchronizing Animations in keyboardWillShow keyboardWillHide -- Hardware Keyboard & Virtual Keyboard Simultaneously

Preamble So I have an application featuring a chat section, and I'm synchronizing the animation of the keyboard hiding and showing with the rise and fall of the chat input. Here's the code I'm ...
Logan's user avatar
  • 52.7k

1
2 3 4 5
21