Questions tagged [uikeyboardtype]

The type of keyboard to display for a given text-based view in iOS.

The keyboard style associated with the text object. (required)

@property(nonatomic) UIKeyboardType keyboardType

Text objects can be targeted for specific types of input, such as plain text, email, numeric entry, and so on. The keyboard style identifies what keys are available on the keyboard and which ones appear by default. The default value for this property is UIKeyboardTypeDefault.

Available in iOS 2.0 and later
Declared In UITextInputTraits.h

typedef enum {
   UIKeyboardTypeDefault,
   UIKeyboardTypeASCIICapable,
   UIKeyboardTypeNumbersAndPunctuation,
   UIKeyboardTypeURL,
   UIKeyboardTypeNumberPad,
   UIKeyboardTypePhonePad,
   UIKeyboardTypeNamePhonePad,
   UIKeyboardTypeEmailAddress,
   UIKeyboardTypeDecimalPad,
   UIKeyboardTypeTwitter,
   UIKeyboardTypeAlphabet = UIKeyboardTypeASCIICapable
} UIKeyboardType;
72 questions
27
votes
2 answers

Programmatically changing keyboard type on iOS does nothing

I want to change keyboard type from default to numeric after user pressed return button. However after setting keyboardType property nothing happens. My code: -(BOOL)textFieldShouldReturn:(UITextField *)textField { [textField…
Kladimir
  • 317
  • 1
  • 3
  • 10
18
votes
3 answers

Is there a UITextField keyboard type that like a number pad but allows negative numbers?

I am setting the UIKeyboardType as UIKeyboardTypeNumberPad on my UITextFields. However, this only allows the user to enter positive integers. I need the user to be able to enter negative or positive integers. Is there a UIKeyboardType that is…
AndyW
  • 748
  • 2
  • 8
  • 18
14
votes
2 answers

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 layout to one of these: typedef enum { …
ahmad
  • 1,141
  • 10
  • 28
10
votes
2 answers

iOS Email Keyboard has Emoji button, can this be disabled?

When setting the keyboard in IB or programatically as below for a UITextField. [textFieldOutlet setKeyboardType:UIKeyboardTypeEmailAddress]; The keyboard has an Emoji icon which means you can type in Emoji's in an email address (which is a bit…
Recycled Steel
  • 2,204
  • 3
  • 27
  • 35
8
votes
2 answers

Which UIKeyboardType can I use on the iPad

I have a a textField object in my iPad app. I would like to give the user a convenient keyboard for entering numbers. In my code I added: UITextField *textField = [[UITextField alloc] initWithFrame:frame]; textField.keyboardType =…
Samantha John
  • 957
  • 1
  • 7
  • 18
8
votes
1 answer

Change UIKeyboardType based on text input

I'm trying to change the UIKeyboardType to the alphabet keyboard when the user types a space, mirroring the effect of typing an apostrophe. However, my code won't change the keyboard appearance until the user dismisses the keyboard and then brings…
MaxGabriel
  • 7,317
  • 4
  • 32
  • 77
6
votes
2 answers

Problem with textFieldShouldReturn method when using UITextField along with UITextView

I have a grouped table view that contains 3 sections and each row per section. The first two section rows contains UITextField(Name & Subject are the section titles) and the last one contains UITextView(Message is the section title) because i want…
5
votes
2 answers

How to disable or hide localization in Number keyboard type?

In my iOS app, when the user click on a UITextfield I need to change the keyboard view to the numeric view automatically. I write below code and it is working fine. UITextField *txtfield = [[UITextField alloc]initWithFrame:CGRectMake(0, 0, 100,…
Kirti Nikam
  • 2,026
  • 2
  • 18
  • 43
4
votes
6 answers

UIKeyboardTypeDecimalPad with negative numbers

I'm working on an iOS app that requires the user to enter numbers into a UITextField using the keyboard type UIKeyboardTypeDecimalPad. However I just realized that there is no support for entering negative numbers, which is a requirement of the…
SNV7
  • 2,403
  • 5
  • 23
  • 36
4
votes
2 answers

How to make UIKeyboardType for hex input only?

Is there any option in swift to make new UIKeyboardType with only HEX(0-9,A,B,C,D,E,F) value using extension or any other way ? I want keyboard that has only hex character enable on it, user can see clearly that he can only enter hex character, or…
Varun Naharia
  • 4,836
  • 7
  • 42
  • 73
4
votes
1 answer

Decimal Pad keyboard not working properly in iOS 8

I'm developing an iOS 8 app in Xcode 6.0.1 and running it on my iPhone 5 (which has iOS 8.0.2 on it). In my app, I'm using a UITextField with the Decimal Pad keyboard type (I use the Xcode storyboard to set the keyboard type). Everything worked as…
Ethan G
  • 1,293
  • 2
  • 14
  • 27
4
votes
1 answer

UIkeyboardtypenumberpad IPAD

I was looking for UIkeyboardtypenumberpad but used in an iPad example. I mean, it is possible to create a class or view which simulated just a numeric keyboard, like iPhone?? i am using 4.1 sdk version. i don't want to use special characters, just…
Vanjo
  • 461
  • 1
  • 5
  • 9
3
votes
2 answers

How to change the return key of UIKeyboard with customized button for iPhone using MonoTouch?

I need to add a button to UIKeyboard in the place of Return key and also need to raise events for that customized button for iPhone using MonoTouch.
KiShOrE
  • 770
  • 6
  • 24
3
votes
3 answers

How to programmatically set iphone keyboard to show desired key set

I am programming an iPhone app that I want a text field where the user can add numbers from the keyboard and add them on the fly, ie, the user might type "1.5+2.4+6.3+.063" and as the user types additional numbers and plus signs the total is…
Mike Hoover
  • 31
  • 1
  • 2
3
votes
4 answers

Hide the keyboard with type UIKeyboardTypeNumberPad objective c

In an iPhone app, I am having a UITextField which needs input as numerics, so I am passing the Keyboard type as UIKeyboardTypeNumberPad. It works but there is no return or Done button, so how can I hide the keyboard. Code for reference…
Mandeep Kaur
  • 183
  • 4
  • 17
1
2 3 4 5