Package apple.uikit

Class UIColor

    • Constructor Detail

      • UIColor

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static UIColor alloc()
      • allocWithZone

        public static UIColor allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

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

        @NotNull
        public static @NotNull UIColor blackColor()
        0.0 white
      • blueColor

        @NotNull
        public static @NotNull UIColor blueColor()
        0.0, 0.0, 1.0 RGB
      • brownColor

        @NotNull
        public static @NotNull UIColor brownColor()
        0.6, 0.4, 0.2 RGB
      • 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()
      • clearColor

        @NotNull
        public static @NotNull UIColor clearColor()
        0.0 white, 0.0 alpha
      • colorWithCGColor

        @NotNull
        public static @NotNull UIColor colorWithCGColor​(@NotNull
                                                        @NotNull CGColorRef cgColor)
      • colorWithCIColor

        @NotNull
        public static @NotNull UIColor colorWithCIColor​(@NotNull
                                                        @NotNull CIColor ciColor)
        API-Since: 5.0
      • colorWithDisplayP3RedGreenBlueAlpha

        @NotNull
        public static @NotNull UIColor colorWithDisplayP3RedGreenBlueAlpha​(double displayP3Red,
                                                                           double green,
                                                                           double blue,
                                                                           double alpha)
        API-Since: 10.0
      • colorWithHueSaturationBrightnessAlpha

        @NotNull
        public static @NotNull UIColor colorWithHueSaturationBrightnessAlpha​(double hue,
                                                                             double saturation,
                                                                             double brightness,
                                                                             double alpha)
      • colorWithPatternImage

        @NotNull
        public static @NotNull UIColor colorWithPatternImage​(@NotNull
                                                             @NotNull UIImage image)
      • colorWithRedGreenBlueAlpha

        @NotNull
        public static @NotNull UIColor colorWithRedGreenBlueAlpha​(double red,
                                                                  double green,
                                                                  double blue,
                                                                  double alpha)
      • colorWithWhiteAlpha

        @NotNull
        public static @NotNull UIColor colorWithWhiteAlpha​(double white,
                                                           double alpha)
        Convenience methods for creating colors
      • cyanColor

        @NotNull
        public static @NotNull UIColor cyanColor()
        0.0, 1.0, 1.0 RGB
      • darkGrayColor

        @NotNull
        public static @NotNull UIColor darkGrayColor()
        0.333 white
      • darkTextColor

        @NotNull
        public static @NotNull UIColor darkTextColor()
        for a light background
      • debugDescription_static

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

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

        @NotNull
        public static @NotNull UIColor grayColor()
        0.5 white
      • greenColor

        @NotNull
        public static @NotNull UIColor greenColor()
        0.0, 1.0, 0.0 RGB
      • groupTableViewBackgroundColor

        @NotNull
        @Deprecated
        public static @NotNull UIColor groupTableViewBackgroundColor()
        Deprecated.
        groupTableViewBackgroundColor is now the same as systemGroupedBackgroundColor. API-Since: 2.0 Deprecated-Since: 13.0
      • hash_static

        public static long hash_static()
      • 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)
      • lightGrayColor

        @NotNull
        public static @NotNull UIColor lightGrayColor()
        0.667 white
      • lightTextColor

        @NotNull
        public static @NotNull UIColor lightTextColor()
        for a dark background
      • magentaColor

        @NotNull
        public static @NotNull UIColor magentaColor()
        1.0, 0.0, 1.0 RGB
      • new_objc

        public static UIColor new_objc()
      • orangeColor

        @NotNull
        public static @NotNull UIColor orangeColor()
        1.0, 0.5, 0.0 RGB
      • purpleColor

        @NotNull
        public static @NotNull UIColor purpleColor()
        0.5, 0.0, 0.5 RGB
      • redColor

        @NotNull
        public static @NotNull UIColor redColor()
        1.0, 0.0, 0.0 RGB
      • resolveClassMethod

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

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

        @NotNull
        @Deprecated
        public static @NotNull UIColor scrollViewTexturedBackgroundColor()
        Deprecated.
        API-Since: 3.2 Deprecated-Since: 7.0
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public static boolean supportsSecureCoding()
      • underPageBackgroundColor

        @NotNull
        @Deprecated
        public static @NotNull UIColor underPageBackgroundColor()
        Deprecated.
        API-Since: 5.0 Deprecated-Since: 7.0
      • version_static

        public static long version_static()
      • viewFlipsideBackgroundColor

        @NotNull
        @Deprecated
        public static @NotNull UIColor viewFlipsideBackgroundColor()
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 7.0
      • whiteColor

        @NotNull
        public static @NotNull UIColor whiteColor()
        1.0 white
      • yellowColor

        @NotNull
        public static @NotNull UIColor yellowColor()
        1.0, 1.0, 0.0 RGB
      • CGColor

        @NotNull
        public @NotNull CGColorRef CGColor()
      • CIColor

        @NotNull
        public @NotNull CIColor CIColor()
        API-Since: 5.0
      • colorWithAlphaComponent

        @NotNull
        public @NotNull UIColor colorWithAlphaComponent​(double alpha)
        Returns a color in the same color space as the receiver with the specified alpha component.
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • getHueSaturationBrightnessAlpha

        public boolean getHueSaturationBrightnessAlpha​(@Nullable
                                                       @Nullable org.moe.natj.general.ptr.NFloatPtr hue,
                                                       @Nullable
                                                       @Nullable org.moe.natj.general.ptr.NFloatPtr saturation,
                                                       @Nullable
                                                       @Nullable org.moe.natj.general.ptr.NFloatPtr brightness,
                                                       @Nullable
                                                       @Nullable org.moe.natj.general.ptr.NFloatPtr alpha)
        API-Since: 5.0
      • getRedGreenBlueAlpha

        public boolean getRedGreenBlueAlpha​(@Nullable
                                            @Nullable org.moe.natj.general.ptr.NFloatPtr red,
                                            @Nullable
                                            @Nullable org.moe.natj.general.ptr.NFloatPtr green,
                                            @Nullable
                                            @Nullable org.moe.natj.general.ptr.NFloatPtr blue,
                                            @Nullable
                                            @Nullable org.moe.natj.general.ptr.NFloatPtr alpha)
        API-Since: 5.0
      • getWhiteAlpha

        public boolean getWhiteAlpha​(@Nullable
                                     @Nullable org.moe.natj.general.ptr.NFloatPtr white,
                                     @Nullable
                                     @Nullable org.moe.natj.general.ptr.NFloatPtr alpha)
        Convenience methods for getting components. If the receiver is of a compatible color space, any non-NULL parameters are populated and 'YES' is returned. Otherwise, the parameters are left unchanged and 'NO' is returned. API-Since: 5.0
      • initWithCGColor

        @NotNull
        public @NotNull UIColor initWithCGColor​(@NotNull
                                                @NotNull CGColorRef cgColor)
      • initWithCIColor

        @NotNull
        public @NotNull UIColor initWithCIColor​(@NotNull
                                                @NotNull CIColor ciColor)
        API-Since: 5.0
      • initWithDisplayP3RedGreenBlueAlpha

        @NotNull
        public @NotNull UIColor initWithDisplayP3RedGreenBlueAlpha​(double displayP3Red,
                                                                   double green,
                                                                   double blue,
                                                                   double alpha)
        API-Since: 10.0
      • initWithHueSaturationBrightnessAlpha

        @NotNull
        public @NotNull UIColor initWithHueSaturationBrightnessAlpha​(double hue,
                                                                     double saturation,
                                                                     double brightness,
                                                                     double alpha)
      • initWithPatternImage

        @NotNull
        public @NotNull UIColor initWithPatternImage​(@NotNull
                                                     @NotNull UIImage image)
      • initWithRedGreenBlueAlpha

        @NotNull
        public @NotNull UIColor initWithRedGreenBlueAlpha​(double red,
                                                          double green,
                                                          double blue,
                                                          double alpha)
      • initWithWhiteAlpha

        @NotNull
        public @NotNull UIColor initWithWhiteAlpha​(double white,
                                                   double alpha)
        Initializers for creating colors
      • set

        public void set()
        Set the color: Sets the fill and stroke colors in the current drawing context. Should be implemented by subclassers.
      • setFill

        public void setFill()
        Set the fill or stroke colors individually. These should be implemented by subclassers.
      • setStroke

        public void setStroke()
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • colorNamed

        @Nullable
        public static @Nullable UIColor colorNamed​(@NotNull
                                                   @NotNull java.lang.String name)
        load from main bundle API-Since: 11.0
      • colorNamedInBundleCompatibleWithTraitCollection

        @Nullable
        public static @Nullable UIColor colorNamedInBundleCompatibleWithTraitCollection​(@NotNull
                                                                                        @NotNull java.lang.String name,
                                                                                        @Nullable
                                                                                        @Nullable NSBundle bundle,
                                                                                        @Nullable
                                                                                        @Nullable UITraitCollection traitCollection)
        API-Since: 11.0
      • itemProviderVisibilityForRepresentationWithTypeIdentifier_static

        public static long itemProviderVisibilityForRepresentationWithTypeIdentifier_static​(@NotNull
                                                                                            @NotNull java.lang.String typeIdentifier)
      • itemProviderVisibilityForRepresentationWithTypeIdentifier

        public long itemProviderVisibilityForRepresentationWithTypeIdentifier​(@NotNull
                                                                              @NotNull java.lang.String typeIdentifier)
      • objectWithItemProviderDataTypeIdentifierError

        @Nullable
        public static @Nullable UIColor objectWithItemProviderDataTypeIdentifierError​(@NotNull
                                                                                      @NotNull NSData data,
                                                                                      @NotNull
                                                                                      @NotNull java.lang.String typeIdentifier,
                                                                                      @Nullable
                                                                                      @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)
      • readableTypeIdentifiersForItemProvider

        @NotNull
        public static @NotNull NSArray<java.lang.String> readableTypeIdentifiersForItemProvider()
      • writableTypeIdentifiersForItemProvider_static

        @NotNull
        public static @NotNull NSArray<java.lang.String> writableTypeIdentifiersForItemProvider_static()
      • writableTypeIdentifiersForItemProvider

        @NotNull
        public @NotNull NSArray<java.lang.String> writableTypeIdentifiersForItemProvider()
      • colorWithDynamicProvider

        @NotNull
        public static @NotNull UIColor colorWithDynamicProvider​(@NotNull
                                                                @NotNull UIColor.Block_colorWithDynamicProvider dynamicProvider)
        Create a dynamic color with a provider. When methods are called on this color that need color component values, the provider is called with UITraitCollection.currentTraitCollection. The provider should use that trait collection to decide a more fundamental UIColor to return. As much as possible, use the given trait collection to make that decision, not other state. API-Since: 13.0
      • labelColor

        @NotNull
        public static @NotNull UIColor labelColor()
        Foreground colors for static text and related elements. API-Since: 13.0
      • linkColor

        @NotNull
        public static @NotNull UIColor linkColor()
        Foreground color for standard system links. API-Since: 13.0
      • opaqueSeparatorColor

        @NotNull
        public static @NotNull UIColor opaqueSeparatorColor()
        API-Since: 13.0
      • placeholderTextColor

        @NotNull
        public static @NotNull UIColor placeholderTextColor()
        Foreground color for placeholder text in controls or text fields or text views. API-Since: 13.0
      • quaternaryLabelColor

        @NotNull
        public static @NotNull UIColor quaternaryLabelColor()
        API-Since: 13.0
      • quaternarySystemFillColor

        @NotNull
        public static @NotNull UIColor quaternarySystemFillColor()
        quaternarySystemFillColor is appropriate for filling large areas containing complex content. Example: Expanded table cells. API-Since: 13.0
      • resolvedColorWithTraitCollection

        @NotNull
        public @NotNull UIColor resolvedColorWithTraitCollection​(@NotNull
                                                                 @NotNull UITraitCollection traitCollection)
        Resolve any color to its most fundamental form (a non-dynamic color) for a specific trait collection. API-Since: 13.0
      • secondaryLabelColor

        @NotNull
        public static @NotNull UIColor secondaryLabelColor()
        API-Since: 13.0
      • secondarySystemBackgroundColor

        @NotNull
        public static @NotNull UIColor secondarySystemBackgroundColor()
        API-Since: 13.0
      • secondarySystemFillColor

        @NotNull
        public static @NotNull UIColor secondarySystemFillColor()
        secondarySystemFillColor is appropriate for filling medium-size shapes. Example: The background of a switch. API-Since: 13.0
      • secondarySystemGroupedBackgroundColor

        @NotNull
        public static @NotNull UIColor secondarySystemGroupedBackgroundColor()
        API-Since: 13.0
      • separatorColor

        @NotNull
        public static @NotNull UIColor separatorColor()
        Foreground colors for separators (thin border or divider lines). `separatorColor` may be partially transparent, so it can go on top of any content. `opaqueSeparatorColor` is intended to look similar, but is guaranteed to be opaque, so it will completely cover anything behind it. Depending on the situation, you may need one or the other. API-Since: 13.0
      • systemBackgroundColor

        @NotNull
        public static @NotNull UIColor systemBackgroundColor()
        We provide two design systems (also known as "stacks") for structuring an iOS app's backgrounds. Each stack has three "levels" of background colors. The first color is intended to be the main background, farthest back. Secondary and tertiary colors are layered on top of the main background, when appropriate. Inside of a discrete piece of UI, choose a stack, then use colors from that stack. We do not recommend mixing and matching background colors between stacks. The foreground colors above are designed to work in both stacks. 1. systemBackground Use this stack for views with standard table views, and designs which have a white primary background in light mode. API-Since: 13.0
      • systemBlueColor

        @NotNull
        public static @NotNull UIColor systemBlueColor()
        API-Since: 7.0
      • systemFillColor

        @NotNull
        public static @NotNull UIColor systemFillColor()
        Fill colors for UI elements. These are meant to be used over the background colors, since their alpha component is less than 1. systemFillColor is appropriate for filling thin and small shapes. Example: The track of a slider. API-Since: 13.0
      • systemGray2Color

        @NotNull
        public static @NotNull UIColor systemGray2Color()
        The numbered variations, systemGray2 through systemGray6, are grays which increasingly trend away from systemGray and in the direction of systemBackgroundColor. In UIUserInterfaceStyleLight: systemGray2 is slightly lighter than systemGray. systemGray3 is lighter than that, and so on. In UIUserInterfaceStyleDark: systemGray2 is slightly darker than systemGray. systemGray3 is darker than that, and so on. API-Since: 13.0
      • systemGray3Color

        @NotNull
        public static @NotNull UIColor systemGray3Color()
        API-Since: 13.0
      • systemGray4Color

        @NotNull
        public static @NotNull UIColor systemGray4Color()
        API-Since: 13.0
      • systemGray5Color

        @NotNull
        public static @NotNull UIColor systemGray5Color()
        API-Since: 13.0
      • systemGray6Color

        @NotNull
        public static @NotNull UIColor systemGray6Color()
        API-Since: 13.0
      • systemGrayColor

        @NotNull
        public static @NotNull UIColor systemGrayColor()
        Shades of gray. systemGray is the base gray color. API-Since: 7.0
      • systemGreenColor

        @NotNull
        public static @NotNull UIColor systemGreenColor()
        API-Since: 7.0
      • systemGroupedBackgroundColor

        @NotNull
        public static @NotNull UIColor systemGroupedBackgroundColor()
        2. systemGroupedBackground Use this stack for views with grouped content, such as grouped tables and platter-based designs. These are like grouped table views, but you may use these colors in places where a table view wouldn't make sense. API-Since: 13.0
      • systemIndigoColor

        @NotNull
        public static @NotNull UIColor systemIndigoColor()
        API-Since: 13.0
      • systemOrangeColor

        @NotNull
        public static @NotNull UIColor systemOrangeColor()
        API-Since: 7.0
      • systemPinkColor

        @NotNull
        public static @NotNull UIColor systemPinkColor()
        API-Since: 7.0
      • systemPurpleColor

        @NotNull
        public static @NotNull UIColor systemPurpleColor()
        API-Since: 9.0
      • systemRedColor

        @NotNull
        public static @NotNull UIColor systemRedColor()
        Some colors that are used by system elements and applications. These return named colors whose values may vary between different contexts and releases. Do not make assumptions about the color spaces or actual colors used. API-Since: 7.0
      • systemTealColor

        @NotNull
        public static @NotNull UIColor systemTealColor()
        API-Since: 7.0
      • systemYellowColor

        @NotNull
        public static @NotNull UIColor systemYellowColor()
        API-Since: 7.0
      • tertiaryLabelColor

        @NotNull
        public static @NotNull UIColor tertiaryLabelColor()
        API-Since: 13.0
      • tertiarySystemBackgroundColor

        @NotNull
        public static @NotNull UIColor tertiarySystemBackgroundColor()
        API-Since: 13.0
      • tertiarySystemFillColor

        @NotNull
        public static @NotNull UIColor tertiarySystemFillColor()
        tertiarySystemFillColor is appropriate for filling large shapes. Examples: Input fields, search bars, buttons. API-Since: 13.0
      • tertiarySystemGroupedBackgroundColor

        @NotNull
        public static @NotNull UIColor tertiarySystemGroupedBackgroundColor()
        API-Since: 13.0
      • accessibilityName

        @NotNull
        public @NotNull java.lang.String accessibilityName()
        Provides an accessible name for the UIColor for use in accessibility attribute APIs, such as when using accessibilityLabel. API-Since: 14.0
      • systemBrownColor

        @NotNull
        public static @NotNull UIColor systemBrownColor()
        API-Since: 13.0
      • systemCyanColor

        @NotNull
        public static @NotNull UIColor systemCyanColor()
        API-Since: 15.0
      • systemMintColor

        @NotNull
        public static @NotNull UIColor systemMintColor()
        API-Since: 15.0
      • tintColor

        @NotNull
        public static @NotNull UIColor tintColor()
        This color represents the tint color of a view. Like other dynamic colors, UIColor.tintColor relies on UITraitCollection.currentTraitCollection being set to a view's trait collection when it is used, so that it can resolve to that view's tint color. If you use UIColor.tintColor outside a view's context, and do not resolve it manually with a view's trait collection, it will return the system default tint color. Setting UIColor.tintColor directly to a view's tintColor property behaves the same as setting nil. However, you cannot set a custom dynamic color (e.g. using +[UIColor colorWithDynamicProvider:]) that can resolve to UIColor.tintColor to a view's tintColor property. API-Since: 15.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.