UIKeyboardType UIKeyboardType Enum

Definition

An enumeration of keyboard types.

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

Fields

AsciiCapable AsciiCapable 1

Displays standard ASCII characters.

ASCIICapable ASCIICapable 1

Displays standard ASCII characters.

AsciiCapableNumberPad AsciiCapableNumberPad 11

Displays numbers and decimal point by using standard ASCII characters.

DecimalPad DecimalPad 8

Displays numbers and decimal point.

Default Default 0

The default keyboard for the current input type.

EmailAddress EmailAddress 7

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

NamePhonePad NamePhonePad 6

Characters plus access to numbers.

NumberPad NumberPad 4

Numbers.

NumbersAndPunctuation NumbersAndPunctuation 2

Numbers and punctuation.

PhonePad PhonePad 5

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

Twitter Twitter 9

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

Url Url 3

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

WebSearch 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