Package apple.uikit

Class UITextView

    • Constructor Detail

      • UITextView

        protected UITextView​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static UITextView allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • appearance

        @NotNull
        public static @NotNull UITextView appearance()
      • appearanceForTraitCollection

        @NotNull
        public static @NotNull UITextView appearanceForTraitCollection​(@NotNull
                                                                       @NotNull UITraitCollection trait)
      • appearanceForTraitCollectionWhenContainedIn

        @NotNull
        @Deprecated
        public static @NotNull UITextView appearanceForTraitCollectionWhenContainedIn​(@NotNull
                                                                                      @NotNull UITraitCollection trait,
                                                                                      @Nullable
                                                                                      @Nullable UIAppearanceContainer ContainerClass,
                                                                                      java.lang.Object... varargs)
        Deprecated.
      • appearanceForTraitCollectionWhenContainedInInstancesOfClasses

        @NotNull
        public static @NotNull UITextView appearanceForTraitCollectionWhenContainedInInstancesOfClasses​(@NotNull
                                                                                                        @NotNull UITraitCollection trait,
                                                                                                        @NotNull
                                                                                                        @NotNull NSArray<?> containerTypes)
      • appearanceWhenContainedIn

        @NotNull
        @Deprecated
        public static @NotNull UITextView appearanceWhenContainedIn​(@Nullable
                                                                    @Nullable UIAppearanceContainer ContainerClass,
                                                                    java.lang.Object... varargs)
        Deprecated.
      • appearanceWhenContainedInInstancesOfClasses

        @NotNull
        public static @NotNull UITextView appearanceWhenContainedInInstancesOfClasses​(@NotNull
                                                                                      @NotNull NSArray<?> containerTypes)
      • areAnimationsEnabled

        public static boolean areAnimationsEnabled()
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • beginAnimationsContext

        @Deprecated
        public static void beginAnimationsContext​(@Nullable
                                                  @Nullable java.lang.String animationID,
                                                  @Nullable
                                                  @Nullable org.moe.natj.general.ptr.VoidPtr context)
        Deprecated.
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • clearTextInputContextIdentifier

        public static void clearTextInputContextIdentifier​(@NotNull
                                                           @NotNull java.lang.String identifier)
      • commitAnimations

        @Deprecated
        public static void commitAnimations()
        Deprecated.
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • inheritedAnimationDuration

        public static double inheritedAnimationDuration()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • layerClass

        @NotNull
        public static @NotNull org.moe.natj.objc.Class layerClass()
      • requiresConstraintBasedLayout

        public static boolean requiresConstraintBasedLayout()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setAnimationBeginsFromCurrentState

        @Deprecated
        public static void setAnimationBeginsFromCurrentState​(boolean fromCurrentState)
        Deprecated.
      • setAnimationCurve

        @Deprecated
        public static void setAnimationCurve​(long curve)
        Deprecated.
      • setAnimationDelay

        @Deprecated
        public static void setAnimationDelay​(double delay)
        Deprecated.
      • setAnimationDelegate

        @Deprecated
        public static void setAnimationDelegate​(@Nullable
                                                @Nullable java.lang.Object delegate)
        Deprecated.
      • setAnimationDidStopSelector

        @Deprecated
        public static void setAnimationDidStopSelector​(@Nullable
                                                       @Nullable org.moe.natj.objc.SEL selector)
        Deprecated.
      • setAnimationDuration_static

        @Deprecated
        public static void setAnimationDuration_static​(double duration)
        Deprecated.
      • setAnimationRepeatAutoreverses

        @Deprecated
        public static void setAnimationRepeatAutoreverses​(boolean repeatAutoreverses)
        Deprecated.
      • setAnimationRepeatCount_static

        @Deprecated
        public static void setAnimationRepeatCount_static​(float repeatCount)
        Deprecated.
      • setAnimationStartDate

        @Deprecated
        public static void setAnimationStartDate​(@NotNull
                                                 @NotNull NSDate startDate)
        Deprecated.
      • setAnimationTransitionForViewCache

        @Deprecated
        public static void setAnimationTransitionForViewCache​(long transition,
                                                              @NotNull
                                                              @NotNull UIView view,
                                                              boolean cache)
        Deprecated.
      • setAnimationWillStartSelector

        @Deprecated
        public static void setAnimationWillStartSelector​(@Nullable
                                                         @Nullable org.moe.natj.objc.SEL selector)
        Deprecated.
      • setAnimationsEnabled

        public static void setAnimationsEnabled​(boolean enabled)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • userInterfaceLayoutDirectionForSemanticContentAttribute

        public static long userInterfaceLayoutDirectionForSemanticContentAttribute​(long attribute)
      • userInterfaceLayoutDirectionForSemanticContentAttributeRelativeToLayoutDirection

        public static long userInterfaceLayoutDirectionForSemanticContentAttributeRelativeToLayoutDirection​(long semanticContentAttribute,
                                                                                                            long layoutDirection)
      • version_static

        public static long version_static()
      • adjustsFontForContentSizeCategory

        public boolean adjustsFontForContentSizeCategory()
        Description copied from interface: UIContentSizeCategoryAdjusting
        Indicates whether the corresponding element should automatically update its font when the device’s UIContentSizeCategory is changed. For this property to take effect, the element’s font must be one of the following: - a font vended using +preferredFontForTextStyle: or +preferredFontForTextStyle:compatibleWithTraitCollection: with a valid UIFontTextStyle - a font vended using - [UIFontMetrics scaledFontForFont:] or one of its variants
        Specified by:
        adjustsFontForContentSizeCategory in interface UIContentSizeCategoryAdjusting
      • allowsEditingTextAttributes

        public boolean allowsEditingTextAttributes()
        defaults to NO API-Since: 6.0
      • _appearance

        @NotNull
        public @NotNull UITextView _appearance()
        Description copied from interface: UIAppearance
        To customize the appearance of all instances of a class, send the relevant appearance modification messages to the appearance proxy for the class. For example, to modify the bar tint color for all UINavigationBar instances: [[UINavigationBar appearance] setBarTintColor:myColor]; Note for iOS7: On iOS7 the tintColor property has moved to UIView, and now has special inherited behavior described in UIView.h. This inherited behavior can conflict with the appearance proxy, and therefore tintColor is now disallowed with the appearance proxy.
        Specified by:
        _appearance in interface UIAppearance
        Overrides:
        _appearance in class UIScrollView
      • _appearanceWhenContainedIn

        @NotNull
        @Deprecated
        public @NotNull UITextView _appearanceWhenContainedIn​(@Nullable
                                                              @Nullable UIAppearanceContainer ContainerClass,
                                                              java.lang.Object... varargs)
        Deprecated.
        Description copied from interface: UIAppearance
        To customize the appearances for instances of a class contained within an instance of a container class, or instances in a hierarchy, use +appearanceWhenContainedInInstancesOfClasses: for the appropriate appearance proxy. For example: [[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[UISplitViewController class]]] setBarTintColor:myColor]; [[UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[UITabBarController class], [UISplitViewController class]]] setBarTintColor:myTabbedNavBarColor]; In any given view hierarchy the outermost appearance proxy wins. Specificity (depth of the chain) is the tie-breaker. In other words, the containment statement is treated as a partial ordering. Given a concrete ordering (actual subview hierarchy), we select the partial ordering that is the first unique match when reading the actual hierarchy from the window down. API-Since: 5.0 Deprecated-Since: 9.0
        Specified by:
        _appearanceWhenContainedIn in interface UIAppearance
        Overrides:
        _appearanceWhenContainedIn in class UIScrollView
      • beginFloatingCursorAtPoint

        public void beginFloatingCursorAtPoint​(CGPoint point)
        Description copied from interface: UITextInput
        The following three optional methods are for clients that wish to display a floating cursor to guide user manipulation of the selected text range via the system-provided keyboard. If a client does not implement these methods, user feedback will be limited to the outcome after setting the selected text range using positions resulting from hit testing. API-Since: 9.0
        Specified by:
        beginFloatingCursorAtPoint in interface UITextInput
      • clearsOnInsertion

        public boolean clearsOnInsertion()
        defaults to NO. if YES, the selection UI is hidden, and inserting text will replace the contents of the field. changing the selection will automatically set this to NO. API-Since: 6.0
      • dataDetectorTypes

        public long dataDetectorTypes()
        API-Since: 3.0
      • delegate

        @Nullable
        public @Nullable java.lang.Object delegate()
        Description copied from class: UIScrollView
        default nil. weak reference
        Overrides:
        delegate in class UIScrollView
      • dictationRecordingDidEnd

        public void dictationRecordingDidEnd()
        Description copied from interface: UITextInput
        These are optional methods for clients that wish to know when there are pending dictation results.
        Specified by:
        dictationRecordingDidEnd in interface UITextInput
      • enablesReturnKeyAutomatically

        public boolean enablesReturnKeyAutomatically()
        Description copied from interface: UITextInputTraits
        default is NO (when YES, will automatically disable return key when text widget has zero-length contents, and will automatically enable when text widget has non-zero-length contents)
        Specified by:
        enablesReturnKeyAutomatically in interface UITextInputTraits
      • font

        @Nullable
        public @Nullable UIFont font()
      • initWithFrameTextContainer

        public UITextView initWithFrameTextContainer​(CGRect frame,
                                                     @Nullable
                                                     @Nullable NSTextContainer textContainer)
        Create a new text view with the specified text container (can be nil). This initializer will follow the NSTextContainer's usage of TextKit 2 (NSTextLayoutManager) or TextKit 1 (NSLayoutManager). If a nil NSTextContainer is specified, TextKit 2 will be used. API-Since: 7.0
      • inputDelegate

        @Nullable
        public @Nullable UITextInputDelegate inputDelegate()
        Description copied from interface: UITextInput
        A system-provided input delegate is assigned when the system is interested in input changes.
        Specified by:
        inputDelegate in interface UITextInput
      • inputView

        @Nullable
        public @Nullable UIView inputView()
        Presented when object becomes first responder. If set to nil, reverts to following responder chain. If set while first responder, will not take effect until reloadInputViews is called.
        Overrides:
        inputView in class UIResponder
      • insertDictationResult

        public void insertDictationResult​(@NotNull
                                          @NotNull NSArray<? extends UIDictationPhrase> dictationResult)
        Description copied from interface: UITextInput
        This is an optional method for clients that wish to support dictation phrase alternatives. If they do not implement this method, dictation will just insert the most likely interpretation of what was spoken via -insertText:. dictationResult is an array of UIDictationPhrases.
        Specified by:
        insertDictationResult in interface UITextInput
      • insertDictationResultPlaceholder

        @NotNull
        public @NotNull java.lang.Object insertDictationResultPlaceholder()
        Description copied from interface: UITextInput
        The following three optional methods are for clients that wish to support a placeholder for pending dictation results. -insertDictationPlaceholder must return a reference to the placeholder. This reference will be used to identify the placeholder by the other methods (there may be more than one placeholder).
        Specified by:
        insertDictationResultPlaceholder in interface UITextInput
      • insertText

        public void insertText​(@NotNull
                               @NotNull java.lang.String text)
        Specified by:
        insertText in interface UIKeyInput
      • isEditable

        public boolean isEditable()
      • setEditable

        public void setEditable​(boolean value)
      • isSelectable

        public boolean isSelectable()
        Toggle selectability, which controls the ability of the user to select content and interact with URLs & attachments. On tvOS this also makes the text view focusable. By default, text item interaction follows selectable if the text item methods on UITextViewDelegate are not implemented; otherwise, they follow the result of the specified delegate methods. API-Since: 7.0
      • setSelectable

        public void setSelectable​(boolean value)
        Toggle selectability, which controls the ability of the user to select content and interact with URLs & attachments. On tvOS this also makes the text view focusable. By default, text item interaction follows selectable if the text item methods on UITextViewDelegate are not implemented; otherwise, they follow the result of the specified delegate methods. API-Since: 7.0
      • layoutManager

        @NotNull
        public @NotNull NSLayoutManager layoutManager()
        To ensure compatibility with older code, accessing the .layoutManager of a UITextView - or its .textContainer's .layoutManager - will cause a UITextView that's using TextKit 2 to 'fall back' to TextKit 1, and return a newly created NSLayoutManager. After this happens, .textLayoutManager will return nil - and _any TextKit 2 objects you may have cached will cease functioning_. Be careful about this if you are intending to be using TextKit 2! API-Since: 7.0
      • linkTextAttributes

        public NSDictionary<java.lang.String,​?> linkTextAttributes()
        Style for links API-Since: 7.0
      • markedTextStyle

        @Nullable
        public @Nullable NSDictionary<java.lang.String,​?> markedTextStyle()
        Description copied from interface: UITextInput
        Describes how the marked text should be drawn.
        Specified by:
        markedTextStyle in interface UITextInput
      • positionWithinRangeAtCharacterOffset

        @Nullable
        public @Nullable UITextPosition positionWithinRangeAtCharacterOffset​(@NotNull
                                                                             @NotNull UITextRange range,
                                                                             long offset)
        Description copied from interface: UITextInput
        To be implemented if there is not a one-to-one correspondence between text positions within range and character offsets into the associated string.
        Specified by:
        positionWithinRangeAtCharacterOffset in interface UITextInput
      • removeDictationResultPlaceholderWillInsertResult

        public void removeDictationResultPlaceholderWillInsertResult​(@NotNull
                                                                     @NotNull java.lang.Object placeholder,
                                                                     boolean willInsertResult)
        Description copied from interface: UITextInput
        willInsertResult will be NO if the recognition failed.
        Specified by:
        removeDictationResultPlaceholderWillInsertResult in interface UITextInput
      • scrollRangeToVisible

        public void scrollRangeToVisible​(NSRange range)
      • selectedRange

        public NSRange selectedRange()
      • selectedTextRange

        @Nullable
        public @Nullable UITextRange selectedTextRange()
        Description copied from interface: UITextInput
        Text may have a selection, either zero-length (a caret) or ranged. Editing operations are always performed on the text from this selection. nil corresponds to no selection.
        Specified by:
        selectedTextRange in interface UITextInput
        Specified by:
        selectedTextRange in interface UITextSearching
      • selectionAffinity

        public long selectionAffinity()
        Description copied from interface: UITextInput
        Selection affinity determines whether, for example, the insertion point appears after the last character on a line or before the first character on the following line in cases where text wraps across line boundaries.
        Specified by:
        selectionAffinity in interface UITextInput
      • setAdjustsFontForContentSizeCategory

        public void setAdjustsFontForContentSizeCategory​(boolean value)
        Description copied from interface: UIContentSizeCategoryAdjusting
        Indicates whether the corresponding element should automatically update its font when the device’s UIContentSizeCategory is changed. For this property to take effect, the element’s font must be one of the following: - a font vended using +preferredFontForTextStyle: or +preferredFontForTextStyle:compatibleWithTraitCollection: with a valid UIFontTextStyle - a font vended using - [UIFontMetrics scaledFontForFont:] or one of its variants
        Specified by:
        setAdjustsFontForContentSizeCategory in interface UIContentSizeCategoryAdjusting
      • setAllowsEditingTextAttributes

        public void setAllowsEditingTextAttributes​(boolean value)
        defaults to NO API-Since: 6.0
      • setAttributedText

        public void setAttributedText​(NSAttributedString value)
        API-Since: 6.0
      • setClearsOnInsertion

        public void setClearsOnInsertion​(boolean value)
        defaults to NO. if YES, the selection UI is hidden, and inserting text will replace the contents of the field. changing the selection will automatically set this to NO. API-Since: 6.0
      • setDataDetectorTypes

        public void setDataDetectorTypes​(long value)
        API-Since: 3.0
      • setDelegate_unsafe

        public void setDelegate_unsafe​(@Nullable
                                       @Nullable java.lang.Object value)
        Description copied from class: UIScrollView
        default nil. weak reference
        Overrides:
        setDelegate_unsafe in class UIScrollView
      • setDelegate

        public void setDelegate​(@Nullable
                                @Nullable java.lang.Object value)
        Description copied from class: UIScrollView
        default nil. weak reference
        Overrides:
        setDelegate in class UIScrollView
      • setEnablesReturnKeyAutomatically

        public void setEnablesReturnKeyAutomatically​(boolean value)
        Description copied from interface: UITextInputTraits
        default is NO (when YES, will automatically disable return key when text widget has zero-length contents, and will automatically enable when text widget has non-zero-length contents)
        Specified by:
        setEnablesReturnKeyAutomatically in interface UITextInputTraits
      • setFont

        public void setFont​(@Nullable
                            @Nullable UIFont value)
      • setInputAccessoryView

        public void setInputAccessoryView​(@Nullable
                                          @Nullable UIView value)
      • setInputDelegate_unsafe

        public void setInputDelegate_unsafe​(@Nullable
                                            @Nullable UITextInputDelegate value)
        Description copied from interface: UITextInput
        A system-provided input delegate is assigned when the system is interested in input changes.
        Specified by:
        setInputDelegate_unsafe in interface UITextInput
      • setInputDelegate

        public void setInputDelegate​(@Nullable
                                     @Nullable UITextInputDelegate value)
      • setInputView

        public void setInputView​(@Nullable
                                 @Nullable UIView value)
        Presented when object becomes first responder. If set to nil, reverts to following responder chain. If set while first responder, will not take effect until reloadInputViews is called.
      • setLinkTextAttributes

        public void setLinkTextAttributes​(NSDictionary<java.lang.String,​?> value)
        Style for links API-Since: 7.0
      • setMarkedTextSelectedRange

        public void setMarkedTextSelectedRange​(@Nullable
                                               @Nullable java.lang.String markedText,
                                               NSRange selectedRange)
        Description copied from interface: UITextInput
        selectedRange is a range within the markedText
        Specified by:
        setMarkedTextSelectedRange in interface UITextInput
      • setMarkedTextStyle

        public void setMarkedTextStyle​(@Nullable
                                       @Nullable NSDictionary<java.lang.String,​?> value)
        Description copied from interface: UITextInput
        Describes how the marked text should be drawn.
        Specified by:
        setMarkedTextStyle in interface UITextInput
      • setReturnKeyType

        public void setReturnKeyType​(long value)
        Description copied from interface: UITextInputTraits
        default is UIReturnKeyDefault (See note under UIReturnKeyType enum)
        Specified by:
        setReturnKeyType in interface UITextInputTraits
      • setSelectedRange

        public void setSelectedRange​(NSRange value)
      • setSelectedTextRange

        public void setSelectedTextRange​(@Nullable
                                         @Nullable UITextRange value)
        Description copied from interface: UITextInput
        Text may have a selection, either zero-length (a caret) or ranged. Editing operations are always performed on the text from this selection. nil corresponds to no selection.
        Specified by:
        setSelectedTextRange in interface UITextInput
      • setSelectionAffinity

        public void setSelectionAffinity​(long value)
        Description copied from interface: UITextInput
        Selection affinity determines whether, for example, the insertion point appears after the last character on a line or before the first character on the following line in cases where text wraps across line boundaries.
        Specified by:
        setSelectionAffinity in interface UITextInput
      • setText

        public void setText​(java.lang.String value)
      • setTextAlignment

        public void setTextAlignment​(long value)
        default is NSLeftTextAlignment
      • setTextColor

        public void setTextColor​(@Nullable
                                 @Nullable UIColor value)
      • setTextContainerInset

        public void setTextContainerInset​(UIEdgeInsets value)
        Inset the text container's layout area within the text view's content area API-Since: 7.0
      • setTypingAttributes

        public void setTypingAttributes​(@NotNull
                                        @NotNull NSDictionary<java.lang.String,​?> value)
        automatically resets when the selection changes API-Since: 6.0
      • text

        public java.lang.String text()
      • textAlignment

        public long textAlignment()
        default is NSLeftTextAlignment
      • textColor

        @Nullable
        public @Nullable UIColor textColor()
      • textContainer

        @NotNull
        public @NotNull NSTextContainer textContainer()
        Get the text container for the text view API-Since: 7.0
      • textContainerInset

        public UIEdgeInsets textContainerInset()
        Inset the text container's layout area within the text view's content area API-Since: 7.0
      • textInRange

        @Nullable
        public @Nullable java.lang.String textInRange​(@NotNull
                                                      @NotNull UITextRange range)
        Description copied from interface: UITextInput
        Methods for manipulating text.
        Specified by:
        textInRange in interface UITextInput
      • textInputView

        @NotNull
        public @NotNull UIView textInputView()
        Description copied from interface: UITextInput
        An affiliated view that provides a coordinate system for all geometric values in this protocol. If unimplemented, the first view in the responder chain will be selected.
        Specified by:
        textInputView in interface UITextInput
      • textStorage

        @NotNull
        public @NotNull NSTextStorage textStorage()
        The textual contents of the text view. API-Since: 7.0
      • textStylingAtPositionInDirection

        @Nullable
        public @Nullable NSDictionary<java.lang.String,​?> textStylingAtPositionInDirection​(@NotNull
                                                                                                 @NotNull UITextPosition position,
                                                                                                 long direction)
        Description copied from interface: UITextInput
        Text styling information can affect, for example, the appearance of a correction rect. Returns a dictionary containing NSAttributedString keys.
        Specified by:
        textStylingAtPositionInDirection in interface UITextInput
      • tokenizer

        @NotNull
        public @NotNull UITextInputTokenizer tokenizer()
        Description copied from interface: UITextInput
        A tokenizer must be provided to inform the text input system about text units of varying granularity.
        Specified by:
        tokenizer in interface UITextInput
      • typingAttributes

        @NotNull
        public @NotNull NSDictionary<java.lang.String,​?> typingAttributes()
        automatically resets when the selection changes API-Since: 6.0
      • isTextDragActive

        public boolean isTextDragActive()
        Description copied from interface: UITextDraggable
        Returns whether this control currently has at least one active drag session.
        Specified by:
        isTextDragActive in interface UITextDraggable
      • isTextDropActive

        public boolean isTextDropActive()
        Description copied from interface: UITextDroppable
        Returns whether this control currently has at least one active drag session.
        Specified by:
        isTextDropActive in interface UITextDroppable
      • setPasteDelegate

        public void setPasteDelegate​(@Nullable
                                     @Nullable UITextPasteDelegate value)
      • setTextDragDelegate

        public void setTextDragDelegate​(@Nullable
                                        @Nullable UITextDragDelegate value)
      • setTextDropDelegate

        public void setTextDropDelegate​(@Nullable
                                        @Nullable UITextDropDelegate value)
      • textDragInteraction

        @Nullable
        public @Nullable UIDragInteraction textDragInteraction()
        Description copied from interface: UITextDraggable
        The text drag interaction that UIKit installs on the text control. Use this to explicitly disable drag interactions on system text controls, if desired.
        Specified by:
        textDragInteraction in interface UITextDraggable
      • textDropInteraction

        @Nullable
        public @Nullable UIDropInteraction textDropInteraction()
        Description copied from interface: UITextDroppable
        The text drop interaction that UIKit installs on the text control. Use this to explicitly disable drop interactions on system text controls, if desired.
        Specified by:
        textDropInteraction in interface UITextDroppable
      • insertTextAlternativesStyle

        public void insertTextAlternativesStyle​(@NotNull
                                                @NotNull java.lang.String text,
                                                @NotNull
                                                @NotNull NSArray<java.lang.String> alternatives,
                                                long style)
        Description copied from interface: UITextInput
        This is an optional method for clients that wish to support text phrase alternatives. If they do not implement this method, the text will be inserted by -insertText: without the phase alternatives.
        Specified by:
        insertTextAlternativesStyle in interface UITextInput
      • insertTextPlaceholderWithSize

        @NotNull
        public @NotNull UITextPlaceholder insertTextPlaceholderWithSize​(CGSize size)
        Description copied from interface: UITextInput
        Insert a placeholder If `size.height` is <= 0, then the placeholder is inline and line height. If `size.height` is > 0, then the placeholder is treated as a paragraph of height `size.height`.
        Specified by:
        insertTextPlaceholderWithSize in interface UITextInput
      • setUsesStandardTextScaling

        public void setUsesStandardTextScaling​(boolean value)
        When turned on, this changes the rendering scale of the text to match the standard text scaling and preserves the original font point sizes when the contents of the text view are copied to the pasteboard. Apps that show a lot of text content, such as a text viewer or editor, should turn this on and use the standard text scaling. API-Since: 13.0
      • usesStandardTextScaling

        public boolean usesStandardTextScaling()
        When turned on, this changes the rendering scale of the text to match the standard text scaling and preserves the original font point sizes when the contents of the text view are copied to the pasteboard. Apps that show a lot of text content, such as a text viewer or editor, should turn this on and use the standard text scaling. API-Since: 13.0
      • interactionState

        @NotNull
        public @NotNull java.lang.Object interactionState()
        Note that the interaction state of a UITextView does _not_ encode the textual content of the field. It should be saved separately, and restored _before_ the interaction state. Currently, this encodes selection (and/or cursor position), scroll position, and first responder status. The object returned here will be a plist type, so can e.g. be stored in an NSUserActivity's userInfo dictionary. API-Since: 15.0
      • setInteractionState

        public void setInteractionState​(@NotNull
                                        @NotNull java.lang.Object value)
        Note that the interaction state of a UITextView does _not_ encode the textual content of the field. It should be saved separately, and restored _before_ the interaction state. Currently, this encodes selection (and/or cursor position), scroll position, and first responder status. The object returned here will be a plist type, so can e.g. be stored in an NSUserActivity's userInfo dictionary. API-Since: 15.0
      • clearAllDecoratedFoundText

        public void clearAllDecoratedFoundText()
        Description copied from interface: UITextSearching
        Called when the current search session has changed or ended, with the expectation that all decorations applied via @c decorateFoundTextRange:usingStyle: are cleared.
        Specified by:
        clearAllDecoratedFoundText in interface UITextSearching
      • compareFoundRangeToRangeInDocument

        public long compareFoundRangeToRangeInDocument​(@NotNull
                                                       @NotNull UITextRange foundRange,
                                                       @NotNull
                                                       @NotNull UITextRange toRange,
                                                       @Nullable
                                                       @Nullable java.lang.Object document)
        Description copied from interface: UITextSearching
        Provide a comparison result comparing developer-provided @c fromRange to @c toRange . This is used by the system find panel to know which @c UITextRange to highlight next when the user taps the "next" or "previous" result buttons.
        Specified by:
        compareFoundRangeToRangeInDocument in interface UITextSearching
        Parameters:
        foundRange - Developer-provided range to compare from.
        toRange - Developer-provided range to compare to.
        document - If multiple documents are used, a document identifier will be provided here. Ranges are only compared between other ranges of the same document.
      • compareOrderFromDocumentToDocument

        public long compareOrderFromDocumentToDocument​(@NotNull
                                                       @NotNull java.lang.Object fromDocument,
                                                       @NotNull
                                                       @NotNull java.lang.Object toDocument)
        Description copied from interface: UITextSearching
        Returns the visible ordering from `fromDocument` to `toDocument`. If your document identifiers are index paths, for example, this would yield the same result as `-[NSIndexPath compare:]`.
        Specified by:
        compareOrderFromDocumentToDocument in interface UITextSearching
      • decorateFoundTextRangeInDocumentUsingStyle

        public void decorateFoundTextRangeInDocumentUsingStyle​(@NotNull
                                                               @NotNull UITextRange range,
                                                               @Nullable
                                                               @Nullable java.lang.Object document,
                                                               long style)
        Description copied from interface: UITextSearching
        Given a found @c range , decorate this text appropriately using the provided @c style type.
        Specified by:
        decorateFoundTextRangeInDocumentUsingStyle in interface UITextSearching
        Parameters:
        range - The range of text to decorate.
        document - If multiple documents are used, the relevant document identifier is provided here. Otherwise nil.
        style - A style hint for how to decorate the text. This is ultimately up to the developer, but developers are encouraged to match the system's appearance (i.e., UITextView) as close as possible.
      • editMenuForTextRangeSuggestedActions

        @Nullable
        public @Nullable UIMenu editMenuForTextRangeSuggestedActions​(@NotNull
                                                                     @NotNull UITextRange textRange,
                                                                     @NotNull
                                                                     @NotNull NSArray<? extends UIMenuElement> suggestedActions)
        Description copied from interface: UITextInput
        Called when the text input is preparing an edit menu presentation for the specified text range.
        Specified by:
        editMenuForTextRangeSuggestedActions in interface UITextInput
        Parameters:
        textRange - The text range for which the menu is presented for.
        suggestedActions - The actions and commands that the system suggests.
        Returns:
        Return a UIMenu describing the desired menu hierarchy. Return @c nil to present the default system menu. API-Since: 16.0
      • findInteraction

        @Nullable
        public @Nullable UIFindInteraction findInteraction()
        If `findInteractionEnabled` is set to true, returns this text view's built-in find interaction. Otherwise, nil. API-Since: 16.0
      • findInteractionDidBeginFindSession

        public void findInteractionDidBeginFindSession​(@NotNull
                                                       @NotNull UIFindInteraction interaction,
                                                       @NotNull
                                                       @NotNull UIFindSession session)
        Description copied from interface: UIFindInteractionDelegate
        Called when the search operation begins (and the system search UI appears). This would be a good time to decorate your view to indicate that a search operation is about to occur. System text elements will apply a dimming view around all non-highlighted search results, for instance.
        Specified by:
        findInteractionDidBeginFindSession in interface UIFindInteractionDelegate
      • isFindInteractionEnabled

        public boolean isFindInteractionEnabled()
        Enables this text view's built-in find interaction. API-Since: 16.0
      • performTextSearchWithQueryStringUsingOptionsResultAggregator

        public void performTextSearchWithQueryStringUsingOptionsResultAggregator​(@NotNull
                                                                                 @NotNull java.lang.String string,
                                                                                 @NotNull
                                                                                 @NotNull UITextSearchOptions options,
                                                                                 @NotNull
                                                                                 @NotNull UITextSearchAggregator aggregator)
        Description copied from interface: UITextSearching
        Perform a text search (across all available searchable documents) using @c string. When results are found, provide the results to @c aggregator.
        Specified by:
        performTextSearchWithQueryStringUsingOptionsResultAggregator in interface UITextSearching
        Parameters:
        string - The query string to search for
        options - Search options provided by the user.
        aggregator - When results are found, provide them to the aggregator. The aggregator is thread-safe, so you may send it messages on other threads.
      • replaceAllOccurrencesOfQueryStringUsingOptionsWithText

        public void replaceAllOccurrencesOfQueryStringUsingOptionsWithText​(@NotNull
                                                                           @NotNull java.lang.String queryString,
                                                                           @NotNull
                                                                           @NotNull UITextSearchOptions options,
                                                                           @NotNull
                                                                           @NotNull java.lang.String replacementText)
        Description copied from interface: UITextSearching
        When replacing all occurrences at once, this method is called instead of the one above.
        Specified by:
        replaceAllOccurrencesOfQueryStringUsingOptionsWithText in interface UITextSearching
        Parameters:
        queryString - The search term to replace.
        options - Search options provided by the find panel UI.
        replacementText - The string to replace it with.
      • replaceFoundTextInRangeInDocumentWithText

        public void replaceFoundTextInRangeInDocumentWithText​(@NotNull
                                                              @NotNull UITextRange range,
                                                              @Nullable
                                                              @Nullable java.lang.Object document,
                                                              @NotNull
                                                              @NotNull java.lang.String replacementText)
        Description copied from interface: UITextSearching
        If you return YES for `-supportsTextReplacement`, this method will be called whenever the user intends to replace a range of text.
        Specified by:
        replaceFoundTextInRangeInDocumentWithText in interface UITextSearching
        Parameters:
        range - The range of text requesting to be replaced.
        document - If multiple search documents are used, the relevant document identifier is provided here. Otherwise nil.
        replacementText - The replacement string.
      • scrollRangeToVisibleInDocument

        public void scrollRangeToVisibleInDocument​(@NotNull
                                                   @NotNull UITextRange range,
                                                   @Nullable
                                                   @Nullable java.lang.Object document)
        Description copied from interface: UITextSearching
        If scrolling is supported, implement this to know when the document should be scrolled to a particular search result.
        Specified by:
        scrollRangeToVisibleInDocument in interface UITextSearching
        Parameters:
        range - The text range to scroll to.
        document - (Optional) If multiple documents are used, the document identifier to scroll to.
      • selectedTextSearchDocument

        @Nullable
        public @Nullable java.lang.Object selectedTextSearchDocument()
        Description copied from interface: UITextSearching
        Returns the current search document, if applicable. Nil otherwise.
        Specified by:
        selectedTextSearchDocument in interface UITextSearching
      • setFindInteractionEnabled

        public void setFindInteractionEnabled​(boolean value)
        Enables this text view's built-in find interaction. API-Since: 16.0
      • shouldReplaceFoundTextInRangeInDocumentWithText

        public boolean shouldReplaceFoundTextInRangeInDocumentWithText​(@NotNull
                                                                       @NotNull UITextRange range,
                                                                       @Nullable
                                                                       @Nullable java.lang.Object document,
                                                                       @NotNull
                                                                       @NotNull java.lang.String replacementText)
        Description copied from interface: UITextSearching
        Optionally return NO to disallow the replacement of a particular result @c range . This will disable the "replace" button in the UI. If this method is unimplemented, it is assumed that all results are replaceable.
        Specified by:
        shouldReplaceFoundTextInRangeInDocumentWithText in interface UITextSearching
        Parameters:
        range - Range to replace.
        document - If multiple documents are used, the document from which range originates.
        replacementText - Text that the user intends to replace with.
      • supportsTextReplacement

        public boolean supportsTextReplacement()
        Description copied from interface: UITextSearching
        Return YES if your searchable item also supports replacement. If this method is unimplemented, it is assumed that text replacement is not supported.
        Specified by:
        supportsTextReplacement in interface UITextSearching
      • textLayoutManager

        @Nullable
        public @Nullable NSTextLayoutManager textLayoutManager()
        This property accesses the TextKit 2 NSTextLayoutManager. You should generally prefer to use it over the TextKit 1 .layoutManager property if it exists. This property will return nil if TextKit 1 is in use. API-Since: 16.0
      • textViewUsingTextLayoutManager

        public static UITextView textViewUsingTextLayoutManager​(boolean usingTextLayoutManager)
        From iOS 16 onwards, UITextViews are, by default, created with a TextKit 2 NSTextLayoutManager managing text layout (see the .textLayoutManager property). They will dynamically 'fall back' to a TextKit 1 NSLayoutManager if TextKit 1 features are used (notably, if the .layoutManager property is accessed). This convenience initializer can be used to specify TextKit 1 by default if you know code in your app relies on that. This avoids inefficiencies associated with the needless creation of a NSTextLayoutManager and the subsequent fallback. API-Since: 16.0
      • willHighlightFoundTextRangeInDocument

        public void willHighlightFoundTextRangeInDocument​(@NotNull
                                                          @NotNull UITextRange range,
                                                          @Nullable
                                                          @Nullable java.lang.Object document)
        Description copied from interface: UITextSearching
        Called when the highlighted search result is about to change to @c range .
        Specified by:
        willHighlightFoundTextRangeInDocument in interface UITextSearching
      • borderStyle

        public long borderStyle()
        The border style for the text field. API-Since: 17.0
      • setBorderStyle

        public void setBorderStyle​(long value)
        The border style for the text field. API-Since: 17.0
      • setSizingRule

        public void setSizingRule​(long value)
        Description copied from interface: UILetterformAwareAdjusting
        `sizingRule` defaults to `UILetterformAwareSizingRuleTypographic` and determines what rule is used during the calculation of `-sizeThatFits:` and `-intrinsicContentSize`
        Specified by:
        setSizingRule in interface UILetterformAwareAdjusting
      • sizingRule

        public long sizingRule()
        Description copied from interface: UILetterformAwareAdjusting
        `sizingRule` defaults to `UILetterformAwareSizingRuleTypographic` and determines what rule is used during the calculation of `-sizeThatFits:` and `-intrinsicContentSize`
        Specified by:
        sizingRule in interface UILetterformAwareAdjusting
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.