net9.0-ios17.2
namespace UIKit
{
    [Protocol(Name = "UITextInput", WrapperType = typeof(UITextInputWrapper))]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "UnmarkText", Selector = "unmarkText")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "DictationRecognitionFailed", Selector = "dictationRecognitionFailed")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "DictationRecordingDidEnd", Selector = "dictationRecordingDidEnd")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "EndFloatingCursor", Selector = "endFloatingCursor")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "InsertDictationResultPlaceholder", ReturnType = typeof(NSObject), Selector = "insertDictationResultPlaceholder")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "ReplaceText", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextRange), typeof(string) }, Selector = "replaceRange:withText:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "SetMarkedText", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(string), typeof(NSRange) }, Selector = "setMarkedText:selectedRange:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "SetBaseWritingDirectionforRange", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(NSWritingDirection), typeof(UITextRange) }, Selector = "setBaseWritingDirection:forRange:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "InsertDictationResult", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(NSArray) }, Selector = "insertDictationResult:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "RemoveDictationResultPlaceholder", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(NSObject), typeof(bool) }, Selector = "removeDictationResultPlaceholder:willInsertResult:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "BeginFloatingCursor", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(CGPoint) }, Selector = "beginFloatingCursorAtPoint:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "UpdateFloatingCursor", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(CGPoint) }, Selector = "updateFloatingCursorAtPoint:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "InsertText", ParameterByRef = new[] { false, false, false }, ParameterType = new[] { typeof(string), typeof(string[]), typeof(UITextAlternativeStyle) }, Selector = "insertText:alternatives:style:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "SetAttributedMarkedText", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(NSAttributedString), typeof(NSRange) }, Selector = "setAttributedMarkedText:selectedRange:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "RemoveTextPlaceholder", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(UITextPlaceholder) }, Selector = "removeTextPlaceholder:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "WillPresentEditMenu", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(IUIEditMenuInteractionAnimating) }, Selector = "willPresentEditMenuWithAnimator:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "WillDismissEditMenu", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(IUIEditMenuInteractionAnimating) }, Selector = "willDismissEditMenuWithAnimator:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "TextInRange", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(UITextRange) }, ReturnType = typeof(string), Selector = "textInRange:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetTextRange", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextPosition), typeof(UITextPosition) }, ReturnType = typeof(UITextRange), Selector = "textRangeFromPosition:toPosition:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetPosition", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextPosition), typeof(IntPtr) }, ReturnType = typeof(UITextPosition), Selector = "positionFromPosition:offset:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetPosition", ParameterByRef = new[] { false, false, false }, ParameterType = new[] { typeof(UITextPosition), typeof(UITextLayoutDirection), typeof(IntPtr) }, ReturnType = typeof(UITextPosition), Selector = "positionFromPosition:inDirection:offset:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "ComparePosition", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextPosition), typeof(UITextPosition) }, ReturnType = typeof(NSComparisonResult), Selector = "comparePosition:toPosition:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetOffsetFromPosition", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextPosition), typeof(UITextPosition) }, ReturnType = typeof(IntPtr), Selector = "offsetFromPosition:toPosition:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetPositionWithinRange", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextRange), typeof(UITextLayoutDirection) }, ReturnType = typeof(UITextPosition), Selector = "positionWithinRange:farthestInDirection:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetCharacterRange", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextPosition), typeof(UITextLayoutDirection) }, ReturnType = typeof(UITextRange), Selector = "characterRangeByExtendingPosition:inDirection:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetBaseWritingDirection", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextPosition), typeof(UITextStorageDirection) }, ReturnType = typeof(NSWritingDirection), Selector = "baseWritingDirectionForPosition:inDirection:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetFirstRectForRange", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(UITextRange) }, ReturnType = typeof(CGRect), Selector = "firstRectForRange:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetCaretRectForPosition", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(UITextPosition) }, ReturnType = typeof(CGRect), Selector = "caretRectForPosition:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetClosestPositionToPoint", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(CGPoint) }, ReturnType = typeof(UITextPosition), Selector = "closestPositionToPoint:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetClosestPositionToPoint", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(CGPoint), typeof(UITextRange) }, ReturnType = typeof(UITextPosition), Selector = "closestPositionToPoint:withinRange:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetCharacterRangeAtPoint", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(CGPoint) }, ReturnType = typeof(UITextRange), Selector = "characterRangeAtPoint:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "GetTextStyling", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextPosition), typeof(UITextStorageDirection) }, ReturnType = typeof(NSDictionary), Selector = "textStylingAtPosition:inDirection:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "GetPosition", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextRange), typeof(IntPtr) }, ReturnType = typeof(UITextPosition), Selector = "positionWithinRange:atCharacterOffset:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "GetCharacterOffsetOfPosition", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextPosition), typeof(UITextRange) }, ReturnType = typeof(IntPtr), Selector = "characterOffsetOfPosition:withinRange:")]
    [ProtocolMember(IsProperty = false, IsRequired = true, IsStatic = false, Name = "GetSelectionRects", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(UITextRange) }, ReturnType = typeof(UITextSelectionRect[]), Selector = "selectionRectsForRange:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "ShouldChangeTextInRange", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextRange), typeof(string) }, ReturnType = typeof(bool), Selector = "shouldChangeTextInRange:replacementText:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "GetFrameForDictationResultPlaceholder", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(NSObject) }, ReturnType = typeof(CGRect), Selector = "frameForDictationResultPlaceholder:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "InsertTextPlaceholder", ParameterByRef = new[] { false }, ParameterType = new[] { typeof(CGSize) }, ReturnType = typeof(UITextPlaceholder), Selector = "insertTextPlaceholderWithSize:")]
    [ProtocolMember(IsProperty = false, IsRequired = false, IsStatic = false, Name = "GetEditMenu", ParameterByRef = new[] { false, false }, ParameterType = new[] { typeof(UITextRange), typeof(UIMenuElement[]) }, ReturnType = typeof(UIMenu), Selector = "editMenuForTextRange:suggestedActions:")]
    [ProtocolMember(ArgumentSemantic = ArgumentSemantic.None, GetterSelector = "beginningOfDocument", IsProperty = true, IsRequired = true, IsStatic = false, Name = "BeginningOfDocument", PropertyType = typeof(UITextPosition), Selector = "beginningOfDocument")]
    [ProtocolMember(ArgumentSemantic = ArgumentSemantic.None, GetterSelector = "endOfDocument", IsProperty = true, IsRequired = true, IsStatic = false, Name = "EndOfDocument", PropertyType = typeof(UITextPosition), Selector = "endOfDocument")]
    [ProtocolMember(ArgumentSemantic = ArgumentSemantic.None, GetterSelector = "tokenizer", IsProperty = true, IsRequired = true, IsStatic = false, Name = "WeakTokenizer", PropertyType = typeof(NSObject), Selector = "tokenizer")]
    [ProtocolMember(ArgumentSemantic = ArgumentSemantic.None, GetterSelector = "textInputView", IsProperty = true, IsRequired = false, IsStatic = false, Name = "TextInputView", PropertyType = typeof(UIView), Selector = "textInputView")]
    [ProtocolMember(ArgumentSemantic = ArgumentSemantic.None, GetterSelector = "markedTextRange", IsProperty = true, IsRequired = true, IsStatic = false, Name = "MarkedTextRange", PropertyType = typeof(UITextRange), Selector = "markedTextRange")]
    [ProtocolMember(ArgumentSemantic = ArgumentSemantic.None, GetterSelector = "selectedTextRange", IsProperty = true, IsRequired = true, IsStatic = false, Name = "SelectedTextRange", PropertyType = typeof(UITextRange), Selector = "selectedTextRange", SetterSelector = "setSelectedTextRange:")]
    [ProtocolMember(ArgumentSemantic = ArgumentSemantic.Copy, GetterSelector = "markedTextStyle", IsProperty = true, IsRequired = true, IsStatic = false, Name = "MarkedTextStyle", PropertyType = typeof(NSDictionary), Selector = "markedTextStyle", SetterSelector = "setMarkedTextStyle:")]
    [ProtocolMember(ArgumentSemantic = ArgumentSemantic.Assign, GetterSelector = "inputDelegate", IsProperty = true, IsRequired = true, IsStatic = false, Name = "WeakInputDelegate", PropertyType = typeof(NSObject), Selector = "inputDelegate", SetterSelector = "setInputDelegate:")]
    [ProtocolMember(ArgumentSemantic = ArgumentSemantic.None, GetterSelector = "selectionAffinity", IsProperty = true, IsRequired = false, IsStatic = false, Name = "SelectionAffinity", PropertyType = typeof(UITextStorageDirection), Selector = "selectionAffinity", SetterSelector = "setSelectionAffinity:")]
    [SupportedOSPlatform("maccatalyst")]
    [SupportedOSPlatform("ios")]
    [SupportedOSPlatform("tvos")]
    public interface IUITextInput : INativeObject, IDisposable, IUIKeyInput, IUITextInputTraits
    {
        [BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
        [Export("selectionRectsForRange:")]
        [Preserve(Conditional = true)]
        UITextSelectionRect![]! GetSelectionRects(UITextRange! range);
    }
}
.NET 6.07.08.09.0
Information specific to net9.0
Platforms This API is only available when you target a specific platform:
iOS 10.010.110.210.311.011.111.211.311.412.012.112.212.312.413.013.113.213.313.413.513.614.014.114.214.314.414.515.015.215.416.016.116.216.417.017.2
Mac Catalyst 13.113.213.313.413.514.214.314.414.515.015.215.416.116.216.417.017.2
tvOS 10.010.110.211.011.111.211.311.412.012.112.212.312.413.013.213.313.414.014.214.314.414.515.015.215.416.016.116.417.017.2
Information specific to net9.0-ios17.2
Assembly

Microsoft.iOS , Version=17.2.0.0, PublicKeyToken=84e04ff9cfb79065

Referencing

The API is automatically referenced.

Platform Restrictions

This API is only supported on the following platforms:

  • iOS
  • Mac Catalyst
  • tvOS
  • Built-in API
  • Package-provided API

11/13/2024
An error has occurred. This application may no longer respond until reloaded. Reload 🗙