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 java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • appearance

        public static java.lang.Object appearance()
      • appearanceForTraitCollection

        public static java.lang.Object appearanceForTraitCollection​(UITraitCollection trait)
      • appearanceForTraitCollectionWhenContainedIn

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

        public static java.lang.Object appearanceForTraitCollectionWhenContainedInInstancesOfClasses​(UITraitCollection trait,
                                                                                                     NSArray<?> containerTypes)
      • appearanceWhenContainedIn

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

        public static java.lang.Object appearanceWhenContainedInInstancesOfClasses​(NSArray<?> containerTypes)
      • areAnimationsEnabled

        public static boolean areAnimationsEnabled()
      • automaticallyNotifiesObserversForKey

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

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

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

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

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

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

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

        public static void commitAnimations()
      • 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

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

        public static org.moe.natj.objc.Class layerClass()
      • new_objc

        public static java.lang.Object new_objc()
      • 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

        public static void setAnimationBeginsFromCurrentState​(boolean fromCurrentState)
      • setAnimationCurve

        public static void setAnimationCurve​(long curve)
      • setAnimationDelay

        public static void setAnimationDelay​(double delay)
      • setAnimationDelegate

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

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

        public static void setAnimationDuration_static​(double duration)
      • setAnimationRepeatAutoreverses

        public static void setAnimationRepeatAutoreverses​(boolean repeatAutoreverses)
      • setAnimationRepeatCount_static

        public static void setAnimationRepeatCount_static​(float repeatCount)
      • setAnimationStartDate

        public static void setAnimationStartDate​(NSDate startDate)
      • setAnimationTransitionForViewCache

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

        public static void setAnimationWillStartSelector​(org.moe.natj.objc.SEL selector)
      • 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
      • _appearance

        public java.lang.Object _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

        @Deprecated
        public java.lang.Object _appearanceWhenContainedIn​(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.
        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.
        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.
      • dataDetectorTypes

        public long dataDetectorTypes()
      • delegate

        public 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
      • initWithFrameTextContainer

        public UITextView initWithFrameTextContainer​(CGRect frame,
                                                     NSTextContainer textContainer)
        Create a new text view with the specified text container (can be nil) - this is the new designated initializer for this class
      • inputView

        public 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​(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

        public 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​(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.
      • 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.
      • layoutManager

        public NSLayoutManager layoutManager()
        Convenience accessors (access through the text container)
      • linkTextAttributes

        public NSDictionary<java.lang.String,​?> linkTextAttributes()
        Style for links
      • removeDictationResultPlaceholderWillInsertResult

        public void removeDictationResultPlaceholderWillInsertResult​(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

        public 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
      • 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
      • 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.
      • setDataDetectorTypes

        public void setDataDetectorTypes​(long value)
      • setDelegate

        public void setDelegate​(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​(UIFont value)
      • setInputAccessoryView

        public void setInputAccessoryView​(UIView value)
      • setInputView

        public void setInputView​(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
      • setMarkedTextSelectedRange

        public void setMarkedTextSelectedRange​(java.lang.String markedText,
                                               NSRange selectedRange)
        Description copied from interface: UITextInput
        selectedRange is a range within the markedText
        Specified by:
        setMarkedTextSelectedRange 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​(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​(UIColor value)
      • setTextContainerInset

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

        public void setTypingAttributes​(NSDictionary<java.lang.String,​?> value)
        automatically resets when the selection changes
      • text

        public java.lang.String text()
      • textAlignment

        public long textAlignment()
        default is NSLeftTextAlignment
      • textColor

        public UIColor textColor()
      • textContainer

        public NSTextContainer textContainer()
        Get the text container for the text view
      • textContainerInset

        public UIEdgeInsets textContainerInset()
        Inset the text container's layout area within the text view's content area
      • textInputView

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

        public NSDictionary<java.lang.String,​?> textStylingAtPositionInDirection​(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
      • typingAttributes

        public NSDictionary<java.lang.String,​?> typingAttributes()
        automatically resets when the selection changes
      • 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
      • setTextDragDelegate_unsafe

        public void setTextDragDelegate_unsafe​(UITextDragDelegate value)
      • setTextDropDelegate_unsafe

        public void setTextDropDelegate_unsafe​(UITextDropDelegate value)
      • textDragInteraction

        public 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

        public 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​(java.lang.String text,
                                                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

        public 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.
      • 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.