UIKeyboardType Enum

Definition

An enumeration of keyboard types.

[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public enum UIKeyboardType
type UIKeyboardType = 
Inheritance
UIKeyboardType
Attributes

Fields

AsciiCapable 1

Displays standard ASCII characters.

ASCIICapable 1

Displays standard ASCII characters.

AsciiCapableNumberPad 11

Displays numbers and decimal point by using standard ASCII characters.

DecimalPad 8

Displays numbers and decimal point.

Default 0

The default keyboard for the current input type.

EmailAddress 7

Characters, an @ symbol, and access to numbers and punctuation.

NamePhonePad 6

Characters plus access to numbers.

NumberPad 4

Numbers.

NumbersAndPunctuation 2

Numbers and punctuation.

PhonePad 5

Numbers plus access to #, *, 'pause', and 'wait'.

Twitter 9

Characters, @ and # keys, and access to numbers and punctuation.

Url 3

Characters, '.', '/', and '.com' keys, and access to numbers and punctuation.

WebSearch 10

Optimized for Web search terms and URL entry.

Remarks

In order to change the keyboard appearance, the currently displaying keyboard must be dismissed. This is achieved by having the UIControl associated with the keyboard resigning as first responder, changing the keyboard type, and then re-subscribed as the first subscriber, as shown in the following code:


void AddKeyboardTypeButton (UIKeyboardType kbType, RectangleF frame)
{
	  var kbButton = UIButton.FromType (UIButtonType.RoundedRect);
	  kbButton.Frame = frame;
	  kbButton.SetTitle (kbType.ToString (), UIControlState.Normal);
	  View.AddSubview (kbButton);
	  kbButton.TouchUpInside += (sender, e) => {
		    myTextField.ResignFirstResponder ();
		    myTextField.KeyboardType = kbType;
		    myTextField.BecomeFirstResponder ();
	  };
}

Applies to