UITextField Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
[Foundation.Register("UITextField", true)]
public class UITextField : UIKit.UIControl, IDisposable, UIKit.IUIContentSizeCategoryAdjusting, UIKit.IUILetterformAwareAdjusting, UIKit.IUITextDraggable, UIKit.IUITextDroppable
[Foundation.Register("UITextField", true)]
public class UITextField : UIKit.UIControl, IDisposable, UIKit.IUIContentSizeCategoryAdjusting, UIKit.IUILetterformAwareAdjusting, UIKit.IUITextInput
[<Foundation.Register("UITextField", true)>]
type UITextField = class
inherit UIControl
interface IUITextInputTraits
interface INativeObject
interface IDisposable
interface IUIContentSizeCategoryAdjusting
interface IUIKeyInput
interface IUILetterformAwareAdjusting
interface IUIPasteConfigurationSupporting
interface IUITextDraggable
interface IUITextInput
interface IUITextDroppable
interface IUITextPasteConfigurationSupporting
[<Foundation.Register("UITextField", true)>]
type UITextField = class
inherit UIControl
interface IUITextInputTraits
interface INativeObject
interface IDisposable
interface IUIContentSizeCategoryAdjusting
interface IUIKeyInput
interface IUILetterformAwareAdjusting
interface IUITextInput
- Inheritance
- Derived
- Attributes
- Implements
Constructors
| Name | Description |
|---|---|
| UITextField() |
Creates a new UITextField with default values. |
| UITextField(CGRect) | |
| UITextField(NativeHandle) |
A constructor used when creating managed representations of unmanaged objects. Called by the runtime. |
| UITextField(NSCoder) |
A constructor that initializes the object from the data stored in the unarchiver object. |
| UITextField(NSObjectFlag) |
Constructor to call on derived classes to skip initialization and merely allocate the object. |
Properties
| Name | Description |
|---|---|
| AccessibilityActivationPoint | (Inherited from UIView) |
| AccessibilityAssistiveTechnologyFocusedIdentifiers | (Inherited from UIResponder) |
| AccessibilityAttributedHint | (Inherited from UIView) |
| AccessibilityAttributedLabel | (Inherited from UIView) |
| AccessibilityAttributedUserInputLabels | (Inherited from UIView) |
| AccessibilityAttributedValue | (Inherited from UIView) |
| AccessibilityCustomActions | (Inherited from UIResponder) |
| AccessibilityDirectTouchOptions | (Inherited from UIView) |
| AccessibilityDragSourceDescriptors | (Inherited from UIResponder) |
| AccessibilityDropPointDescriptors | (Inherited from UIResponder) |
| AccessibilityElementsHidden | (Inherited from UIView) |
| AccessibilityExpandedStatus | (Inherited from UIView) |
| AccessibilityFrame | (Inherited from UIView) |
| AccessibilityHeaderElements | (Inherited from UIView) |
| AccessibilityHint | (Inherited from UIView) |
| AccessibilityIdentifier |
Uniquely identifies |
| AccessibilityIgnoresInvertColors | (Inherited from UIView) |
| AccessibilityLabel | (Inherited from UIView) |
| AccessibilityLanguage | (Inherited from UIView) |
| AccessibilityNavigationStyle | (Inherited from UIView) |
| AccessibilityPath | (Inherited from UIView) |
| AccessibilityRespondsToUserInteraction | (Inherited from UIView) |
| AccessibilityTextualContext | (Inherited from UIView) |
| AccessibilityTraits | (Inherited from UIView) |
| AccessibilityUserInputLabels | (Inherited from UIView) |
| AccessibilityValue | (Inherited from UIView) |
| AccessibilityViewIsModal | (Inherited from UIView) |
| ActivityItemsConfiguration | (Inherited from UIResponder) |
| AdjustsFontForContentSizeCategory | |
| AdjustsFontSizeToFitWidth | |
| AlignmentRectInsets | (Inherited from UIView) |
| AllControlEvents | (Inherited from UIControl) |
| AllowedWritingToolsResultOptions | |
| AllowsEditingTextAttributes | |
| AllowsNumberPadPopover | |
| AllTargets | (Inherited from UIControl) |
| Alpha | (Inherited from UIView) |
| AnchorPoint | (Inherited from UIView) |
| Appearance |
Strongly-typed property that returns the UIAppearance class for this class. |
| AppliedContentSizeCategoryLimitsDescription | (Inherited from UIView) |
| AttributedPlaceholder | |
| AttributedText | |
| AutocapitalizationType |
The UITextAutocapitalizationType used by the IUITextInput. |
| AutocorrectionType |
The UITextAutocorrectionType used by the IUITextInput. |
| AutoresizingMask | (Inherited from UIView) |
| AutosizesSubviews | (Inherited from UIView) |
| Background | |
| BackgroundColor |
The color used for the background. (Inherited from UIView) |
| BeginningOfDocument |
The position of text indicating the beginning of a document. |
| BorderStyle | |
| BottomAnchor | (Inherited from UIView) |
| Bounds | (Inherited from UIView) |
| CanBecomeFirstResponder | (Inherited from UIResponder) |
| CanBecomeFocused | (Inherited from UIView) |
| CanResignFirstResponder | (Inherited from UIResponder) |
| Center | (Inherited from UIView) |
| CenterXAnchor | (Inherited from UIView) |
| CenterYAnchor | (Inherited from UIView) |
| Class | (Inherited from NSObject) |
| ClassHandle |
The Objective-C class handle for this class. |
| ClearButtonMode | |
| ClearsContextBeforeDrawing | (Inherited from UIView) |
| ClearsOnBeginEditing | |
| ClearsOnInsertion | |
| ClipsToBounds | (Inherited from UIView) |
| CollisionBoundingPath |
Returns the closed path that is used for collision detection. (Inherited from UIView) |
| CollisionBoundsType |
Returns a value that tells how collision bounds are specified. (Inherited from UIView) |
| Constraints | (Inherited from UIView) |
| ContentMode | (Inherited from UIView) |
| ContentScaleFactor | (Inherited from UIView) |
| ContentStretch | (Inherited from UIView) |
| ContextMenuInteraction | (Inherited from UIControl) |
| ContextMenuInteractionEnabled | (Inherited from UIControl) |
| ConversationContext | |
| CoordinateSpace |
Gets the coordinate space implemenation. (Inherited from UIView) |
| CornerConfiguration | (Inherited from UIView) |
| CurrentInputModeDidChangeNotification |
Notification constant for CurrentInputModeDidChange |
| DebugDescription | (Inherited from NSObject) |
| Delegate |
An instance of the UIKit.IUITextFieldDelegate model class which acts as the class delegate. |
| Description | (Inherited from NSObject) |
| DidEndEditingReasonKey | |
| DirectionalLayoutMargins | (Inherited from UIView) |
| DisabledBackground | |
| Editable | |
| EditingInteractionConfiguration | (Inherited from UIResponder) |
| EffectiveContentHorizontalAlignment | (Inherited from UIControl) |
| EffectiveUserInterfaceLayoutDirection | (Inherited from UIView) |
| Enabled |
Whether this UIControl is enabled. (Inherited from UIControl) |
| EnablesReturnKeyAutomatically |
Whether the return key is automatically enabled. |
| EndOfDocument |
The position of text indicating the beginning of a document. |
| ExclusiveTouch |
Restricts the event delivery to this view. (Inherited from UIView) |
| FirstBaselineAnchor | (Inherited from UIView) |
| Focused |
Whether the UIView is the focused view. (Inherited from UIView) |
| FocusEffect | (Inherited from UIView) |
| FocusGroupIdentifier | (Inherited from UIView) |
| FocusGroupPriority | (Inherited from UIView) |
| FocusItemContainer |
Gets the container that manages focus information for child focus items. (Inherited from UIView) |
| FocusItemDeferralMode | (Inherited from UIView) |
| Font | |
| Frame | (Inherited from UIView) |
| GestureRecognizers | (Inherited from UIView) |
| Handle |
Handle (pointer) to the unmanaged object representation. (Inherited from NSObject) |
| HasAmbiguousLayout | (Inherited from UIView) |
| HasText |
Gets a value that tells whether the key input has text in it. |
| HeightAnchor | (Inherited from UIView) |
| Hidden |
Specifies whether the UIView displays or not. (Inherited from UIView) |
| Highlighted |
Whether this UIControl is highlighted. (Inherited from UIControl) |
| HorizontalAlignment | (Inherited from UIControl) |
| HoverStyle | (Inherited from UIView) |
| InlinePredictionType | |
| InputAccessoryView | |
| InputAccessoryViewController | (Inherited from UIResponder) |
| InputAssistantItem | (Inherited from UIResponder) |
| InputDelegate |
The input delegate object for this UITextField. |
| InputView | |
| InputViewController | (Inherited from UIResponder) |
| InsetsLayoutMarginsFromSafeArea | (Inherited from UIView) |
| Interactions | (Inherited from UIView) |
| InteractionState | |
| IntrinsicContentSize | (Inherited from UIView) |
| IsAccessibilityElement | (Inherited from UIView) |
| IsDirectBinding | (Inherited from NSObject) |
| IsEditing |
A value that indicates if the user is editing the text in the view. Read-only. |
| IsFirstResponder | (Inherited from UIResponder) |
| IsProxy | (Inherited from NSObject) |
| IsTransparentFocusItem | (Inherited from UIView) |
| KeyboardAppearance |
The UIKeyboardAppearance used by the IUITextInput |
| KeyboardLayoutGuide | (Inherited from UIView) |
| KeyboardType |
The UIKeyboardType used by the IUITextInput. |
| KeyCommands | (Inherited from UIResponder) |
| LargeContentImage | (Inherited from UIView) |
| LargeContentImageInsets | (Inherited from UIView) |
| LargeContentTitle | (Inherited from UIView) |
| LastBaselineAnchor | (Inherited from UIView) |
| Layer | (Inherited from UIView) |
| LayoutGuides | (Inherited from UIView) |
| LayoutMargins | (Inherited from UIView) |
| LayoutMarginsGuide | (Inherited from UIView) |
| LeadingAnchor | (Inherited from UIView) |
| LeftAnchor | (Inherited from UIView) |
| LeftView | |
| LeftViewMode | |
| MarkedTextRange |
The currently marked range of text in a given document. |
| MarkedTextStyle |
Attribute dictionary describing how text should be drawn. |
| MaskView | (Inherited from UIView) |
| MathExpressionCompletionType | |
| MaximumContentSizeCategory | (Inherited from UIView) |
| MinimumContentSizeCategory | (Inherited from UIView) |
| MinimumFontSize | |
| MotionEffects | (Inherited from UIView) |
| MultipleTouchEnabled |
Controls whether the UIView can handle multitouch events. (Inherited from UIView) |
| NextResponder | (Inherited from UIResponder) |
| Opaque |
Determines whether the view is opaque or not. (Inherited from UIView) |
| OverrideUserInterfaceStyle | (Inherited from UIView) |
| ParentFocusEnvironment |
Gets the parent focus environment. (Inherited from UIView) |
| PasswordRules |
The password entry rules. |
| PasteConfiguration |
The UIPasteConfiguration supported by |
| PasteDelegate |
Gets the delegate for handling text pasting and text drops. |
| Placeholder | |
| PreferredFocusedView |
If not |
| PreferredFocusEnvironments |
Gets the list of focus environments, ordered by priority, that the environment prefers when updating the focus. (Inherited from UIView) |
| PreservesSuperviewLayoutMargins | (Inherited from UIView) |
| ReadableContentGuide | (Inherited from UIView) |
| RestorationIdentifier | (Inherited from UIView) |
| RetainCount | (Inherited from NSObject) |
| ReturnKeyType |
The form of the return key for the IUITextInput. |
| RightAnchor | (Inherited from UIView) |
| RightView | |
| RightViewMode | |
| SafeAreaInsets | (Inherited from UIView) |
| SafeAreaLayoutGuide | (Inherited from UIView) |
| ScalesLargeContentImage | (Inherited from UIView) |
| SecureTextEntry |
Whether the entered text should be hidden. |
| Selected |
Whether this UIControl is selected. (Inherited from UIControl) |
| SelectedTextRange |
The range of a document's selected text. |
| SelectionAffinity |
A value that controls whether the cursor is displayed at the start of the last line or end of the second-to-last line of a multiline selection. |
| Self | (Inherited from NSObject) |
| SemanticContentAttribute | (Inherited from UIView) |
| ShouldBeginEditing |
Raised when the text field wants to know if editing should begin. |
| ShouldChangeCharacters |
Raised when the text field wants to know if the text in the text field should be changed. |
| ShouldChangeCharactersInRanges |
Raised when the text field wants to know if the text in the text field should be changed for multiple ranges. |
| ShouldClear |
Raised when the text field wants to know if the text in the text field should be cleared. |
| ShouldEndEditing |
Raised when the text field wants to know if editing should end. |
| ShouldGroupAccessibilityChildren | (Inherited from UIView) |
| ShouldReturn |
Raised when the 'Return' key was pressed, and the text field wants to know whether it should process this key press or not using the default behavior. |
| ShowsLargeContentViewer | (Inherited from UIView) |
| ShowsMenuAsPrimaryAction | (Inherited from UIControl) |
| SizingRule | |
| SmartDashesType |
The smart dashes style. |
| SmartInsertDeleteType |
The smart insert style. |
| SmartQuotesType |
The smart quotes style. |
| SpellCheckingType |
Gets or sets a value that tells whether spell-checking is on, off, or if spell-checking will be enabled only when auto-complete is enabled (default). |
| State | (Inherited from UIControl) |
| Subviews | (Inherited from UIView) |
| Superclass | (Inherited from NSObject) |
| SuperHandle |
Handle used to represent the methods in the base class for this NSObject. (Inherited from NSObject) |
| Superview | (Inherited from UIView) |
| SupportsAdaptiveImageGlyph | |
| SymbolAnimationEnabled | (Inherited from UIControl) |
| Tag | (Inherited from UIView) |
| Text | |
| TextAlignment | |
| TextBackgroundColorKey |
Developers should not use this deprecated property. Developers should use 'NSAttributedString.BackgroundColorAttributeName'. |
| TextColor | |
| TextColorKey |
The property holds the key that should be used to retrieve the value of the text color from a NSDictionary. |
| TextContentType |
The semantic of the expected input, which allows the system to, for example, provide custom keyboards. |
| TextDidBeginEditingNotification |
Notification constant for TextDidBeginEditing |
| TextDidEndEditingNotification |
Notification constant for TextDidEndEditing |
| TextDragActive |
Gets a Boolean value that tells whether a drag session is active for the text view. |
| TextDragDelegate |
Gets or sets a delegate for managing drag source behavior. |
| TextDragInteraction |
Gets the drag interaction on the text view. |
| TextDragOptions |
Gets a value that controls how formatting is displayed in dragged text. |
| TextDropActive |
Gets a Boolean value that tells whether there is an active text drop session on the view. |
| TextDropDelegate |
Gets or sets a delegate for managing text drop behavior. |
| TextDropInteraction |
Gets the drop interaction on the text view. |
| TextFieldTextDidChangeNotification |
Notification constant for TextFieldTextDidChange |
| TextFontKey |
The property holds the key that should be used to retrieve the value of the font for the text from a NSDictionary. |
| TextInputContextIdentifier | (Inherited from UIResponder) |
| TextInputMode | (Inherited from UIResponder) |
| TextInputView |
Returns the input view that provides the coordinate system for geometric operations within the text input. |
| TintAdjustmentMode | (Inherited from UIView) |
| TintColor |
The color used for tinting. (Inherited from UIView) |
| Tokenizer |
This property provides information on the tokenizer that would be used to break up the text into units such as characters, words, lines, and paragraphs. |
| ToolTip | (Inherited from UIControl) |
| ToolTipInteraction | (Inherited from UIControl) |
| TopAnchor | (Inherited from UIView) |
| TouchBar | (Inherited from UIResponder) |
| TouchInside |
Whether a touch is inside this UIControl. Read-only. (Inherited from UIControl) |
| Tracking |
Whether this UIControl is tracking touches related to an event. Read-only. (Inherited from UIControl) |
| TrailingAnchor | (Inherited from UIView) |
| TraitCollection |
Gets the trait collection that describes the environment. (Inherited from UIView) |
| TraitOverrides | (Inherited from UIView) |
| Transform | (Inherited from UIView) |
| Transform3D | (Inherited from UIView) |
| TranslatesAutoresizingMaskIntoConstraints | (Inherited from UIView) |
| TypingAttributes | |
| UndoManager | (Inherited from UIResponder) |
| UserActivity | (Inherited from UIResponder) |
| UserInteractionEnabled |
Determines whether input events are processed by this view. (Inherited from UIView) |
| VerticalAlignment | (Inherited from UIControl) |
| ViewForBaselineLayout | (Inherited from UIView) |
| ViewForFirstBaselineLayout | (Inherited from UIView) |
| ViewForLastBaselineLayout | (Inherited from UIView) |
| ViewPrintFormatter | (Inherited from UIView) |
| WeakDefaultTextAttributes | |
| WeakDelegate | |
| WeakInputDelegate |
Indicates a weak input delegate. |
| WeakTokenizer |
Indicates a weak tokenizer. |
| WidthAnchor | (Inherited from UIView) |
| Window | (Inherited from UIView) |
| WritingToolsBehavior | |
| Zone | (Inherited from NSObject) |
Methods
Events
| Name | Description |
|---|---|
| AllEditingEvents |
Raised on any editing events produced. (Inherited from UIControl) |
| AllEvents |
Raised for any event produced. (Inherited from UIControl) |
| AllTouchEvents |
Raised for any touch event produced. (Inherited from UIControl) |
| DidChangeSelection |
Raised when the text selection changed. |
| EditingChanged |
The component changed. (Inherited from UIControl) |
| EditingDidBegin |
Raised when editing has started. (Inherited from UIControl) |
| EditingDidEnd |
Raised when editing ended. (Inherited from UIControl) |
| EditingDidEndOnExit |
Raised on didEndOnexit (Inherited from UIControl) |
| Ended |
Raised when editing has ended. |
| EndedWithReason |
Event that is raised when editing ends. |
| PrimaryActionTriggered |
Event associated with the most-likely behavior of the UIControl. (Inherited from UIControl) |
| Started |
Raised when editing has started. |
| TouchCancel |
The touch event has been canceled. (Inherited from UIControl) |
| TouchDown |
Raised when the user touches the control. (Inherited from UIControl) |
| TouchDownRepeat |
Raised when the user double taps the control. (Inherited from UIControl) |
| TouchDragEnter |
Raised on TouchDragEnter events. (Inherited from UIControl) |
| TouchDragExit |
Raised on TouchDragExit events. (Inherited from UIControl) |
| TouchDragInside |
Raised oN TouchDragInside events. (Inherited from UIControl) |
| TouchDragOutside |
Raised on TouchDragOutside events. (Inherited from UIControl) |
| TouchUpInside |
Raised on TouchUpInside events. (Inherited from UIControl) |
| TouchUpOutside |
Raised on TouchUpOutside events. (Inherited from UIControl) |
| ValueChanged |
The value has changed. (Inherited from UIControl) |