public class UIColor extends NSObject implements NSSecureCoding, NSCopying, NSItemProviderReading, NSItemProviderWriting
| Modifier and Type | Class and Description |
|---|---|
static interface |
UIColor.Block_colorWithDynamicProvider |
static interface |
UIColor.Block_initWithDynamicProvider |
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_retNSItemProviderWriting.Block_loadDataWithTypeIdentifierForItemProviderCompletionHandler| Modifier | Constructor and Description |
|---|---|
protected |
UIColor(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
long |
_itemProviderVisibilityForRepresentationWithTypeIdentifier_static(java.lang.String typeIdentifier) |
UIColor |
_objectWithItemProviderDataTypeIdentifierError(NSData data,
java.lang.String typeIdentifier,
org.moe.natj.general.ptr.Ptr<NSError> outError) |
NSArray<java.lang.String> |
_readableTypeIdentifiersForItemProvider() |
boolean |
_supportsSecureCoding()
This property must return YES on all classes that allow secure coding.
|
NSArray<java.lang.String> |
_writableTypeIdentifiersForItemProvider_static() |
java.lang.String |
accessibilityName()
Provides an accessible name for the UIColor for use in accessibility attribute APIs, such as when using accessibilityLabel.
|
static boolean |
accessInstanceVariablesDirectly() |
static UIColor |
alloc() |
static UIColor |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static UIColor |
blackColor()
0.0 white
|
static UIColor |
blueColor()
0.0, 0.0, 1.0 RGB
|
static UIColor |
brownColor()
0.6, 0.4, 0.2 RGB
|
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
CGColorRef |
CGColor() |
CIColor |
CIColor() |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
static UIColor |
clearColor()
0.0 white, 0.0 alpha
|
static UIColor |
colorNamed(java.lang.String name)
load from main bundle
|
static UIColor |
colorNamedInBundleCompatibleWithTraitCollection(java.lang.String name,
NSBundle bundle,
UITraitCollection traitCollection) |
UIColor |
colorWithAlphaComponent(double alpha)
Returns a color in the same color space as the receiver with the specified alpha component.
|
static UIColor |
colorWithCGColor(CGColorRef cgColor) |
static UIColor |
colorWithCIColor(CIColor ciColor) |
static UIColor |
colorWithDisplayP3RedGreenBlueAlpha(double displayP3Red,
double green,
double blue,
double alpha) |
static UIColor |
colorWithDynamicProvider(UIColor.Block_colorWithDynamicProvider dynamicProvider)
Create a dynamic color with a provider.
|
static UIColor |
colorWithHueSaturationBrightnessAlpha(double hue,
double saturation,
double brightness,
double alpha) |
static UIColor |
colorWithPatternImage(UIImage image) |
static UIColor |
colorWithRedGreenBlueAlpha(double red,
double green,
double blue,
double alpha) |
static UIColor |
colorWithWhiteAlpha(double white,
double alpha)
Convenience methods for creating colors
|
java.lang.Object |
copyWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static UIColor |
cyanColor()
0.0, 1.0, 1.0 RGB
|
static UIColor |
darkGrayColor()
0.333 white
|
static UIColor |
darkTextColor()
for a light background
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
void |
encodeWithCoder(NSCoder coder) |
boolean |
getHueSaturationBrightnessAlpha(org.moe.natj.general.ptr.NFloatPtr hue,
org.moe.natj.general.ptr.NFloatPtr saturation,
org.moe.natj.general.ptr.NFloatPtr brightness,
org.moe.natj.general.ptr.NFloatPtr alpha) |
boolean |
getRedGreenBlueAlpha(org.moe.natj.general.ptr.NFloatPtr red,
org.moe.natj.general.ptr.NFloatPtr green,
org.moe.natj.general.ptr.NFloatPtr blue,
org.moe.natj.general.ptr.NFloatPtr alpha) |
boolean |
getWhiteAlpha(org.moe.natj.general.ptr.NFloatPtr white,
org.moe.natj.general.ptr.NFloatPtr alpha)
Convenience methods for getting components.
|
static UIColor |
grayColor()
0.5 white
|
static UIColor |
greenColor()
0.0, 1.0, 0.0 RGB
|
static UIColor |
groupTableViewBackgroundColor()
groupTableViewBackgroundColor is now the same as systemGroupedBackgroundColor.
|
static long |
hash_static() |
UIColor |
init() |
UIColor |
initWithCGColor(CGColorRef cgColor) |
UIColor |
initWithCIColor(CIColor ciColor) |
UIColor |
initWithCoder(NSCoder coder)
NS_DESIGNATED_INITIALIZER
|
UIColor |
initWithDisplayP3RedGreenBlueAlpha(double displayP3Red,
double green,
double blue,
double alpha) |
UIColor |
initWithDynamicProvider(UIColor.Block_initWithDynamicProvider dynamicProvider) |
UIColor |
initWithHueSaturationBrightnessAlpha(double hue,
double saturation,
double brightness,
double alpha) |
UIColor |
initWithPatternImage(UIImage image) |
UIColor |
initWithRedGreenBlueAlpha(double red,
double green,
double blue,
double alpha) |
UIColor |
initWithWhiteAlpha(double white,
double alpha)
Initializers for creating colors
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static long |
itemProviderVisibilityForRepresentationWithTypeIdentifier_static(java.lang.String typeIdentifier) |
long |
itemProviderVisibilityForRepresentationWithTypeIdentifier(java.lang.String typeIdentifier) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static UIColor |
labelColor()
Foreground colors for static text and related elements.
|
static UIColor |
lightGrayColor()
0.667 white
|
static UIColor |
lightTextColor()
for a dark background
|
static UIColor |
linkColor()
Foreground color for standard system links.
|
NSProgress |
loadDataWithTypeIdentifierForItemProviderCompletionHandler(java.lang.String typeIdentifier,
NSItemProviderWriting.Block_loadDataWithTypeIdentifierForItemProviderCompletionHandler completionHandler)
One of writableTypeIdentifiersForItemProvider
|
static UIColor |
magentaColor()
1.0, 0.0, 1.0 RGB
|
static UIColor |
new_objc() |
static UIColor |
objectWithItemProviderDataTypeIdentifierError(NSData data,
java.lang.String typeIdentifier,
org.moe.natj.general.ptr.Ptr<NSError> outError) |
static UIColor |
opaqueSeparatorColor() |
static UIColor |
orangeColor()
1.0, 0.5, 0.0 RGB
|
static UIColor |
placeholderTextColor()
Foreground color for placeholder text in controls or text fields or text views.
|
static UIColor |
purpleColor()
0.5, 0.0, 0.5 RGB
|
static UIColor |
quaternaryLabelColor() |
static UIColor |
quaternarySystemFillColor()
quaternarySystemFillColor is appropriate for filling large areas containing complex content.
|
static NSArray<java.lang.String> |
readableTypeIdentifiersForItemProvider() |
static UIColor |
redColor()
1.0, 0.0, 0.0 RGB
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
UIColor |
resolvedColorWithTraitCollection(UITraitCollection traitCollection)
Resolve any color to its most fundamental form (a non-dynamic color) for a specific trait collection.
|
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
static UIColor |
scrollViewTexturedBackgroundColor()
Deprecated.
|
static UIColor |
secondaryLabelColor() |
static UIColor |
secondarySystemBackgroundColor() |
static UIColor |
secondarySystemFillColor()
secondarySystemFillColor is appropriate for filling medium-size shapes.
|
static UIColor |
secondarySystemGroupedBackgroundColor() |
static UIColor |
separatorColor()
Foreground colors for separators (thin border or divider lines).
|
void |
set()
Set the color: Sets the fill and stroke colors in the current drawing context.
|
void |
setFill()
Set the fill or stroke colors individually.
|
void |
setStroke() |
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
static boolean |
supportsSecureCoding() |
static UIColor |
systemBackgroundColor()
We provide two design systems (also known as "stacks") for structuring an iOS app's backgrounds.
|
static UIColor |
systemBlueColor() |
static UIColor |
systemBrownColor() |
static UIColor |
systemCyanColor() |
static UIColor |
systemFillColor()
Fill colors for UI elements.
|
static UIColor |
systemGray2Color()
The numbered variations, systemGray2 through systemGray6, are grays which increasingly
trend away from systemGray and in the direction of systemBackgroundColor.
|
static UIColor |
systemGray3Color() |
static UIColor |
systemGray4Color() |
static UIColor |
systemGray5Color() |
static UIColor |
systemGray6Color() |
static UIColor |
systemGrayColor()
Shades of gray.
|
static UIColor |
systemGreenColor() |
static UIColor |
systemGroupedBackgroundColor()
2.
|
static UIColor |
systemIndigoColor() |
static UIColor |
systemMintColor() |
static UIColor |
systemOrangeColor() |
static UIColor |
systemPinkColor() |
static UIColor |
systemPurpleColor() |
static UIColor |
systemRedColor()
Some colors that are used by system elements and applications.
|
static UIColor |
systemTealColor() |
static UIColor |
systemYellowColor() |
static UIColor |
tertiaryLabelColor() |
static UIColor |
tertiarySystemBackgroundColor() |
static UIColor |
tertiarySystemFillColor()
tertiarySystemFillColor is appropriate for filling large shapes.
|
static UIColor |
tertiarySystemGroupedBackgroundColor() |
static UIColor |
tintColor()
This color represents the tint color of a view.
|
static UIColor |
underPageBackgroundColor()
Deprecated.
|
static long |
version_static() |
static UIColor |
viewFlipsideBackgroundColor()
Deprecated.
|
static UIColor |
whiteColor()
1.0 white
|
static NSArray<java.lang.String> |
writableTypeIdentifiersForItemProvider_static() |
NSArray<java.lang.String> |
writableTypeIdentifiersForItemProvider() |
static UIColor |
yellowColor()
1.0, 1.0, 0.0 RGB
|
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static UIColor alloc()
public static UIColor allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static UIColor blackColor()
public static UIColor blueColor()
public static UIColor brownColor()
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static UIColor clearColor()
public static UIColor colorWithCGColor(CGColorRef cgColor)
public static UIColor colorWithDisplayP3RedGreenBlueAlpha(double displayP3Red, double green, double blue, double alpha)
public static UIColor colorWithHueSaturationBrightnessAlpha(double hue, double saturation, double brightness, double alpha)
public static UIColor colorWithRedGreenBlueAlpha(double red, double green, double blue, double alpha)
public static UIColor colorWithWhiteAlpha(double white, double alpha)
public static UIColor cyanColor()
public static UIColor darkGrayColor()
public static UIColor darkTextColor()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static UIColor grayColor()
public static UIColor greenColor()
public static UIColor groupTableViewBackgroundColor()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static UIColor lightGrayColor()
public static UIColor lightTextColor()
public static UIColor magentaColor()
public static UIColor new_objc()
public static UIColor orangeColor()
public static UIColor purpleColor()
public static UIColor redColor()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
@Deprecated public static UIColor scrollViewTexturedBackgroundColor()
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static boolean supportsSecureCoding()
@Deprecated public static UIColor underPageBackgroundColor()
public static long version_static()
@Deprecated public static UIColor viewFlipsideBackgroundColor()
public static UIColor whiteColor()
public static UIColor yellowColor()
public CGColorRef CGColor()
public CIColor CIColor()
public UIColor colorWithAlphaComponent(double alpha)
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
copyWithZone in interface NSCopyingpublic void encodeWithCoder(NSCoder coder)
encodeWithCoder in interface NSCodingpublic boolean getHueSaturationBrightnessAlpha(org.moe.natj.general.ptr.NFloatPtr hue,
org.moe.natj.general.ptr.NFloatPtr saturation,
org.moe.natj.general.ptr.NFloatPtr brightness,
org.moe.natj.general.ptr.NFloatPtr alpha)
public boolean getRedGreenBlueAlpha(org.moe.natj.general.ptr.NFloatPtr red,
org.moe.natj.general.ptr.NFloatPtr green,
org.moe.natj.general.ptr.NFloatPtr blue,
org.moe.natj.general.ptr.NFloatPtr alpha)
public boolean getWhiteAlpha(org.moe.natj.general.ptr.NFloatPtr white,
org.moe.natj.general.ptr.NFloatPtr alpha)
public UIColor initWithCGColor(CGColorRef cgColor)
public UIColor initWithCoder(NSCoder coder)
NSCodinginitWithCoder in interface NSCodingpublic UIColor initWithDisplayP3RedGreenBlueAlpha(double displayP3Red, double green, double blue, double alpha)
public UIColor initWithHueSaturationBrightnessAlpha(double hue, double saturation, double brightness, double alpha)
public UIColor initWithRedGreenBlueAlpha(double red, double green, double blue, double alpha)
public UIColor initWithWhiteAlpha(double white, double alpha)
public void set()
public void setFill()
public void setStroke()
public boolean _supportsSecureCoding()
NSSecureCoding_supportsSecureCoding in interface NSSecureCodingpublic static UIColor colorNamed(java.lang.String name)
public static UIColor colorNamedInBundleCompatibleWithTraitCollection(java.lang.String name, NSBundle bundle, UITraitCollection traitCollection)
public static long itemProviderVisibilityForRepresentationWithTypeIdentifier_static(java.lang.String typeIdentifier)
public long _itemProviderVisibilityForRepresentationWithTypeIdentifier_static(java.lang.String typeIdentifier)
_itemProviderVisibilityForRepresentationWithTypeIdentifier_static in interface NSItemProviderWritingpublic long itemProviderVisibilityForRepresentationWithTypeIdentifier(java.lang.String typeIdentifier)
public NSProgress loadDataWithTypeIdentifierForItemProviderCompletionHandler(java.lang.String typeIdentifier, NSItemProviderWriting.Block_loadDataWithTypeIdentifierForItemProviderCompletionHandler completionHandler)
NSItemProviderWritingloadDataWithTypeIdentifierForItemProviderCompletionHandler in interface NSItemProviderWritingpublic static UIColor objectWithItemProviderDataTypeIdentifierError(NSData data, java.lang.String typeIdentifier, org.moe.natj.general.ptr.Ptr<NSError> outError)
public UIColor _objectWithItemProviderDataTypeIdentifierError(NSData data, java.lang.String typeIdentifier, org.moe.natj.general.ptr.Ptr<NSError> outError)
_objectWithItemProviderDataTypeIdentifierError in interface NSItemProviderReadingpublic static NSArray<java.lang.String> readableTypeIdentifiersForItemProvider()
public NSArray<java.lang.String> _readableTypeIdentifiersForItemProvider()
_readableTypeIdentifiersForItemProvider in interface NSItemProviderReadingpublic static NSArray<java.lang.String> writableTypeIdentifiersForItemProvider_static()
public NSArray<java.lang.String> _writableTypeIdentifiersForItemProvider_static()
_writableTypeIdentifiersForItemProvider_static in interface NSItemProviderWritingpublic NSArray<java.lang.String> writableTypeIdentifiersForItemProvider()
public static UIColor colorWithDynamicProvider(UIColor.Block_colorWithDynamicProvider dynamicProvider)
public UIColor initWithDynamicProvider(UIColor.Block_initWithDynamicProvider dynamicProvider)
public static UIColor labelColor()
public static UIColor linkColor()
public static UIColor opaqueSeparatorColor()
public static UIColor placeholderTextColor()
public static UIColor quaternaryLabelColor()
public static UIColor quaternarySystemFillColor()
public UIColor resolvedColorWithTraitCollection(UITraitCollection traitCollection)
public static UIColor secondaryLabelColor()
public static UIColor secondarySystemBackgroundColor()
public static UIColor secondarySystemFillColor()
public static UIColor secondarySystemGroupedBackgroundColor()
public static UIColor separatorColor()
public static UIColor systemBackgroundColor()
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.
public static UIColor systemBlueColor()
public static UIColor systemFillColor()
systemFillColor is appropriate for filling thin and small shapes. Example: The track of a slider.
public static UIColor systemGray2Color()
In UIUserInterfaceStyleLight: systemGray1 is slightly lighter than systemGray. systemGray2 is lighter than that, and so on. In UIUserInterfaceStyleDark: systemGray1 is slightly darker than systemGray. systemGray2 is darker than that, and so on.
public static UIColor systemGray3Color()
public static UIColor systemGray4Color()
public static UIColor systemGray5Color()
public static UIColor systemGray6Color()
public static UIColor systemGrayColor()
public static UIColor systemGreenColor()
public static UIColor systemGroupedBackgroundColor()
public static UIColor systemIndigoColor()
public static UIColor systemOrangeColor()
public static UIColor systemPinkColor()
public static UIColor systemPurpleColor()
public static UIColor systemRedColor()
public static UIColor systemTealColor()
public static UIColor systemYellowColor()
public static UIColor tertiaryLabelColor()
public static UIColor tertiarySystemBackgroundColor()
public static UIColor tertiarySystemFillColor()
public static UIColor tertiarySystemGroupedBackgroundColor()
public java.lang.String accessibilityName()
public static UIColor systemBrownColor()
public static UIColor systemCyanColor()
public static UIColor systemMintColor()
public static UIColor tintColor()
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.