iOS Guides | Samples

MonoTouch.UIKit.UIKeyboardType Enumeration

An enumeration of keyboard types.

Syntax

[MonoTouch.ObjCRuntime.Native]
[MonoTouch.ObjCRuntime.Unavailable(MonoTouch.ObjCRuntime.PlatformName.WatchOS, MonoTouch.ObjCRuntime.PlatformArchitecture.All, null)]
public enum UIKeyboardType

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:

C# Example

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 ();
	  };
}

Members

Member NameDescription
AsciiCapableDisplays standard ASCII characters.
ASCIICapableDisplays standard ASCII characters.
AsciiCapableNumberPadDisplays numbers and decimal point by using standard ASCII characters.
DecimalPadDisplays numbers and decimal point.
DefaultThe default keyboard for the current input type.
EmailAddressCharacters, an @ symbol, and access to numbers and punctuation.
NamePhonePadCharacters plus access to numbers.
NumberPadNumbers.
NumbersAndPunctuationNumbers and punctuation.
PhonePadNumbers plus access to #, *, 'pause', and 'wait'.
TwitterCharacters, @ and # keys, and access to numbers and punctuation.
UrlCharacters, '.', '/', and '.com' keys, and access to numbers and punctuation.
WebSearchOptimized for Web search terms and URL entry.

Requirements

Namespace: MonoTouch.UIKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0

The members of MonoTouch.UIKit.UIKeyboardType are listed below.

See Also: Enum

Public Fields

AsciiCapableUIKeyboardType. Displays standard ASCII characters.
ASCIICapableUIKeyboardType. Displays standard ASCII characters.
AsciiCapableNumberPadUIKeyboardType. Displays numbers and decimal point by using standard ASCII characters.
DecimalPadUIKeyboardType. Displays numbers and decimal point.
DefaultUIKeyboardType. The default keyboard for the current input type.
EmailAddressUIKeyboardType. Characters, an @ symbol, and access to numbers and punctuation.
NamePhonePadUIKeyboardType. Characters plus access to numbers.
NumberPadUIKeyboardType. Numbers.
NumbersAndPunctuationUIKeyboardType. Numbers and punctuation.
PhonePadUIKeyboardType. Numbers plus access to #, *, 'pause', and 'wait'.
TwitterUIKeyboardType. Characters, @ and # keys, and access to numbers and punctuation.
UrlUIKeyboardType. Characters, '.', '/', and '.com' keys, and access to numbers and punctuation.
WebSearchUIKeyboardType. Optimized for Web search terms and URL entry.