Title: Theory / Important / CS / Programming / Objective-C / Library / UIKit / View / trait collection
On every note of this deck, unless a note says otherwise:
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc
Page: https://developer.apple.com/documentation/uikit/uitraitcollection?language=objc

Typ: UITraitCollection
Meaning: The iOS interface environment for your app, including traits such as horizontal and vertical size class, display scale, and user interface idiom.
Page: https://developer.apple.com/documentation/uikit/uiviewconfigurationstate?language=objc
Language: Objective-C

Variable: traitCollection.imageConfiguration
Meaning: An image configuration object compatible with this trait collection.
Language: Objective-C
Variables: UITraitCollection traitCollection

Variable: traitCollection.forceTouchCapability
Meaning: The force touch capability value of the trait collection.
Language: Objective-C
Variables: UITraitCollection traitCollection

Variable: traitCollection.activeAppearance
Meaning: whether the user interface has an active appearance.
Language: Objective-C
Variables: UITraitCollection traitCollection

Variable: traitCollection.legibilityWeight
Meaning: The font weight to apply to text.
Language: Objective-C
Variables: UITraitCollection traitCollection

Variable: traitCollection.accessibilityContrast
Meaning: The accessibility contrast associated with the current environment.
Language: Objective-C
Variables: UITraitCollection traitCollection

Variable: traitCollection.layoutDirection
Meaning: The layout direction associated with the current environment.
Language: Objective-C
Typ: UITraitEnvironmentLayoutDirection
Variables: UITraitCollection traitCollection

Variable: traitCollection.userInterfaceLevel
Meaning: The elevation level of the interface.
Language: Objective-C
Typ: UIUserInterfaceLevel
Variables: UITraitCollection traitCollection

Variable: traitCollection.userInterfaceIdiom
Meaning: The user interface idiom of the trait collection.
Language: Objective-C
Typ: UIUserInterfaceIdiom
Variables: UITraitCollection traitCollection
Initialization: UIUserInterfaceIdiomUnspecified.

Variable: traitCollection.displayGamut
Meaning: The gamut of the current display.
Language: Objective-C
Typ: UIDisplayGamut
Variables: UITraitCollection traitCollection

Variable: traitCollection.displayScale
Meaning: The display scale of the trait collection
Language: Objective-C
Variables: UITraitCollection traitCollection
Initialization: 0.0 unspecified

Variable: traitCollection.(vertical|horizontal)SizeClass
Meaning: The vertical|horizontal size class of the trait collection.
Language: Objective-C
Typ: UIUserInterfaceSizeClass
Variables: UITraitCollection traitCollection

Variable: traitCollection.currentTraitCollection
Meaning: The complete set of traits for the current environment.
Language: Objective-C
Variables: UITraitCollection traitCollection

Instruction: [traitCollection
  init
]
Effect: init
Language: Objective-C
Variables: UITraitCollection traitCollection

Instruction: [traitCollection
  initWithCoder:coder
]
Effect: Init with coder
Language: Objective-C
Variables: UITraitCollection traitCollection

Instruction: [traitCollection
  containsTraitsInCollection:trait
]
Language: Objective-C
Returns: whether a trait collection contains all of another trait collection’s values.
Variables: UITraitCollection traitCollection

Instruction: [traitCollection
  performAsCurrentTraitCollection:actions
]
Effect: Executes custom code using the traits of the current trait collection.
Language: Objective-C
Variables: UITraitCollection traitCollection
Extra: when you want to execute code using a set of traits that differ from those in the current trait environment

Instruction: [traitCollection
  hasDifferentColorAppearanceComparedToTraitCollection:traitCollection
]
Language: Objective-C
Returns: whether changing between the specified and current trait collections would affect color values
Variables: UITraitCollection traitCollection

Instruction: [UITraitCollection
  traitCollectionWithTraitsFromCollections:traitCollections
]
Language: Objective-C
Returns: a trait collection that consists of traits merged from a specified array of trait collections.

Instruction: [UITraitCollection
  traitCollectionWithUserInterfaceIdiom:idiom
]
Language: Objective-C
Returns: a trait collection that contains only a specified interface idiom.

Instruction: [UITraitCollection
  traitCollectionWithHorizontalSizeClass:horizontalSizeClass
]
Language: Objective-C
Returns: a trait collection that contains only a specified horizontal size class.

Instruction: [UITraitCollection
  traitCollectionWithUserInterfaceStyle:userInterfaceStyle
]
Language: Objective-C
Returns: a trait collection that contains only the specified user interface style trait.

Instruction: [UITraitCollection
  traitCollectionWithUserInterfaceStyle:accessibilityContrast
]
Language: Objective-C
Returns: a trait collection that contains only the specified accessibility contrast trait.

Instruction: [UITraitCollection
  traitCollectionWithUserInterfaceLevel:userInterfaceLevel
]
Language: Objective-C
Returns: a trait collection that contains only the specified user interface level trait.

Instruction: [UITraitCollection
  traitCollectionWithLegibilityWeight:legibilityWeight
]
Language: Objective-C
Returns: a trait collection that contains only the specified legibility weight trait.

Instruction: [UITraitCollection
  traitCollectionWithForceTouchCapability:capability
]
Language: Objective-C
Returns: a trait collection that contains only a specified force touch capability trait.

Instruction: [UITraitCollection
  traitCollectionWithDisplayScale:displayScale
]
Language: Objective-C
Returns: a trait collection that contains only a specified display scale.

Instruction: [UITraitCollection
  traitCollectionWithDisplayGamut:displaGamut
]
Language: Objective-C
Returns: a trait collection that contains only the specified display gamut trait.

Instruction: [UITraitCollection
  traitCollectionWithLayoutDirection:layoutDirection
]
Language: Objective-C
Returns: a trait collection that contains only the specified layout direction trait.

Instruction: [UITraitCollection
  traitCollectionWithPreferredContentSizeCategory:preferredContentSizeCategory
]
Language: Objective-C
Returns: a trait collection that contains only the specified content size category trait.

Instruction: [UITraitCollection
  traitCollectionWithActiveAppearance:userInteractiveActiveApearance
]
Language: Objective-C
Returns: a trait collection that contains only the specified active appearance trait.