Package apple.uikit

Class UILabel

    • Constructor Detail

      • UILabel

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static UILabel alloc()
      • allocWithZone

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

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

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

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

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

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

        @NotNull
        public static @NotNull UILabel 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()
      • new_objc

        public static UILabel 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

        @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
      • adjustsFontSizeToFitWidth

        public boolean adjustsFontSizeToFitWidth()
        default is NO
      • adjustsLetterSpacingToFitWidth

        @Deprecated
        public boolean adjustsLetterSpacingToFitWidth()
        Deprecated.
        Non-functional. Hand tune by using NSKernAttributeName to affect tracking, or consider using the allowsDefaultTighteningForTruncation property. API-Since: 6.0 Deprecated-Since: 7.0
      • allowsDefaultTighteningForTruncation

        public boolean allowsDefaultTighteningForTruncation()
        default is NO API-Since: 9.0
      • _appearance

        @NotNull
        public @NotNull UILabel _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 UIView
      • _appearanceWhenContainedIn

        @NotNull
        @Deprecated
        public @NotNull UILabel _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 UIView
      • attributedText

        @Nullable
        public @Nullable NSAttributedString attributedText()
        default is nil API-Since: 6.0
      • baselineAdjustment

        public long baselineAdjustment()
        default is UIBaselineAdjustmentAlignBaselines
      • drawTextInRect

        public void drawTextInRect​(CGRect rect)
      • font

        public UIFont font()
        default is nil (system font 17 plain)
      • highlightedTextColor

        @Nullable
        public @Nullable UIColor highlightedTextColor()
        default is nil
      • isEnabled

        public boolean isEnabled()
        default is YES. changes how the label is drawn
      • setEnabled

        public void setEnabled​(boolean value)
        default is YES. changes how the label is drawn
      • isHighlighted

        public boolean isHighlighted()
        default is NO
      • setHighlighted

        public void setHighlighted​(boolean value)
        default is NO
      • setUserInteractionEnabled

        public void setUserInteractionEnabled​(boolean value)
        default is NO
        Overrides:
        setUserInteractionEnabled in class UIView
      • lineBreakMode

        public long lineBreakMode()
        default is NSLineBreakByTruncatingTail. used for single and multiple lines of text
      • minimumFontSize

        @Deprecated
        public double minimumFontSize()
        Deprecated.
        deprecated - use minimumScaleFactor. default is 0.0 API-Since: 2.0 Deprecated-Since: 6.0
      • minimumScaleFactor

        public double minimumScaleFactor()
        default is 0.0 API-Since: 6.0
      • numberOfLines

        public long numberOfLines()
        this determines the number of lines to draw and what to do when sizeToFit is called. default value is 1 (single line). A value of 0 means no limit if the height of the text reaches the # of lines or the height of the view is less than the # of lines allowed, the text will be truncated using the line break mode.
      • preferredMaxLayoutWidth

        public double preferredMaxLayoutWidth()
        Support for constraint-based layout (auto layout) If nonzero, this is used when determining -intrinsicContentSize for multiline labels API-Since: 6.0
      • 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
      • setAdjustsFontSizeToFitWidth

        public void setAdjustsFontSizeToFitWidth​(boolean value)
        default is NO
      • setAdjustsLetterSpacingToFitWidth

        @Deprecated
        public void setAdjustsLetterSpacingToFitWidth​(boolean value)
        Deprecated.
        Non-functional. Hand tune by using NSKernAttributeName to affect tracking, or consider using the allowsDefaultTighteningForTruncation property. API-Since: 6.0 Deprecated-Since: 7.0
      • setAllowsDefaultTighteningForTruncation

        public void setAllowsDefaultTighteningForTruncation​(boolean value)
        default is NO API-Since: 9.0
      • setAttributedText

        public void setAttributedText​(@Nullable
                                      @Nullable NSAttributedString value)
        default is nil API-Since: 6.0
      • setBaselineAdjustment

        public void setBaselineAdjustment​(long value)
        default is UIBaselineAdjustmentAlignBaselines
      • setFont

        public void setFont​(UIFont value)
        default is nil (system font 17 plain)
      • setHighlightedTextColor

        public void setHighlightedTextColor​(@Nullable
                                            @Nullable UIColor value)
        default is nil
      • setLineBreakMode

        public void setLineBreakMode​(long value)
        default is NSLineBreakByTruncatingTail. used for single and multiple lines of text
      • setMinimumFontSize

        @Deprecated
        public void setMinimumFontSize​(double value)
        Deprecated.
        deprecated - use minimumScaleFactor. default is 0.0 API-Since: 2.0 Deprecated-Since: 6.0
      • setMinimumScaleFactor

        public void setMinimumScaleFactor​(double value)
        default is 0.0 API-Since: 6.0
      • setNumberOfLines

        public void setNumberOfLines​(long value)
        this determines the number of lines to draw and what to do when sizeToFit is called. default value is 1 (single line). A value of 0 means no limit if the height of the text reaches the # of lines or the height of the view is less than the # of lines allowed, the text will be truncated using the line break mode.
      • setPreferredMaxLayoutWidth

        public void setPreferredMaxLayoutWidth​(double value)
        Support for constraint-based layout (auto layout) If nonzero, this is used when determining -intrinsicContentSize for multiline labels API-Since: 6.0
      • setShadowColor

        public void setShadowColor​(@Nullable
                                   @Nullable UIColor value)
        default is nil (no shadow)
      • setShadowOffset

        public void setShadowOffset​(CGSize value)
        default is CGSizeMake(0, -1) -- a top shadow
      • setText

        public void setText​(@Nullable
                            @Nullable java.lang.String value)
        default is nil
      • setTextAlignment

        public void setTextAlignment​(long value)
        default is NSTextAlignmentNatural (before iOS 9, the default was NSTextAlignmentLeft)
      • setTextColor

        public void setTextColor​(UIColor value)
        default is labelColor
      • shadowColor

        @Nullable
        public @Nullable UIColor shadowColor()
        default is nil (no shadow)
      • shadowOffset

        public CGSize shadowOffset()
        default is CGSizeMake(0, -1) -- a top shadow
      • text

        @Nullable
        public @Nullable java.lang.String text()
        default is nil
      • textAlignment

        public long textAlignment()
        default is NSTextAlignmentNatural (before iOS 9, the default was NSTextAlignmentLeft)
      • textColor

        public UIColor textColor()
        default is labelColor
      • textRectForBoundsLimitedToNumberOfLines

        public CGRect textRectForBoundsLimitedToNumberOfLines​(CGRect bounds,
                                                              long numberOfLines)
        override points. can adjust rect before calling super. label has default content mode of UIViewContentModeRedraw
      • lineBreakStrategy

        public long lineBreakStrategy()
        Specifies the line break strategies that may be used for laying out the text in this label. If this property is not set, the default value is NSLineBreakStrategyStandard. If the label contains an attributed text with paragraph style(s) that specify a set of line break strategies, the set of strategies in the paragraph style(s) will be used instead of the set of strategies defined by this property. API-Since: 14.0
      • setLineBreakStrategy

        public void setLineBreakStrategy​(long value)
        Specifies the line break strategies that may be used for laying out the text in this label. If this property is not set, the default value is NSLineBreakStrategyStandard. If the label contains an attributed text with paragraph style(s) that specify a set of line break strategies, the set of strategies in the paragraph style(s) will be used instead of the set of strategies defined by this property. API-Since: 14.0
      • setShowsExpansionTextWhenTruncated

        public void setShowsExpansionTextWhenTruncated​(boolean value)
        Indicates whether expansion text will be shown when the view is too small to show all the contents. Defaults to NO.
      • showsExpansionTextWhenTruncated

        public boolean showsExpansionTextWhenTruncated()
        Indicates whether expansion text will be shown when the view is too small to show all the contents. Defaults to NO.
      • preferredVibrancy

        public long preferredVibrancy()
        Controls whether a label becomes vibrant automatically. If a label has a vibrancy mode other than `None` set, the system tries to apply vibrancy automatically to that label. This will only succeed if the label is in a context that allows vibrancy, which in general means the the label needs to be on top of a blurred material. This property can only be used to opt-in to automatic vibrancy. It is not a way to opt-out of vibrancy that is enabled by other means. A label placed in a vibrant `UIVisualEffectView` with preferred vibrancy `None` will still be vibrant. The default is `automatic` on xrOS and `none` on all other platforms. API-Since: 17.0
      • setPreferredVibrancy

        public void setPreferredVibrancy​(long value)
        Controls whether a label becomes vibrant automatically. If a label has a vibrancy mode other than `None` set, the system tries to apply vibrancy automatically to that label. This will only succeed if the label is in a context that allows vibrancy, which in general means the the label needs to be on top of a blurred material. This property can only be used to opt-in to automatic vibrancy. It is not a way to opt-out of vibrancy that is enabled by other means. A label placed in a vibrant `UIVisualEffectView` with preferred vibrancy `None` will still be vibrant. The default is `automatic` on xrOS and `none` on all other platforms. 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.