pub unsafe trait UITraitDefinition: MainThreadOnly {
// Provided methods
fn identifier(mtm: MainThreadMarker) -> Retained<NSString>
where Self: Sized + ClassType { ... }
fn name(mtm: MainThreadMarker) -> Retained<NSString>
where Self: Sized + ClassType { ... }
fn affectsColorAppearance(mtm: MainThreadMarker) -> bool
where Self: Sized + ClassType { ... }
}Available on crate feature
UITrait only.Expand description
Provided Methods§
Sourcefn identifier(mtm: MainThreadMarker) -> Retained<NSString>
fn identifier(mtm: MainThreadMarker) -> Retained<NSString>
A unique identifier string for the trait (reverse-DNS format recommended). Allows the trait to be encoded/decoded, and to map both a Swift and Objective-C trait to the same data.
Sourcefn name(mtm: MainThreadMarker) -> Retained<NSString>
fn name(mtm: MainThreadMarker) -> Retained<NSString>
A short human-readable name for the trait, e.g. for printing and debugging output. By default, the trait’s class name is used when not implemented.
Sourcefn affectsColorAppearance(mtm: MainThreadMarker) -> bool
fn affectsColorAppearance(mtm: MainThreadMarker) -> bool
Whether the trait is used to resolve dynamic colors (or images), and changes to the trait should automatically trigger views using dynamic colors/images to update their appearance. Default is NO.
Trait Implementations§
Source§impl ProtocolType for dyn UITraitDefinition
impl ProtocolType for dyn UITraitDefinition
impl<T> ImplementedBy<T> for dyn UITraitDefinition
Implementations on Foreign Types§
impl<T> UITraitDefinition for ProtocolObject<T>where
T: ?Sized + UITraitDefinition,
Implementors§
impl UITraitDefinition for UITraitAccessibilityContrast
impl UITraitDefinition for UITraitActiveAppearance
impl UITraitDefinition for UITraitDisplayGamut
impl UITraitDefinition for UITraitDisplayScale
impl UITraitDefinition for UITraitForceTouchCapability
impl UITraitDefinition for UITraitHDRHeadroomUsageLimit
impl UITraitDefinition for UITraitHorizontalSizeClass
impl UITraitDefinition for UITraitImageDynamicRange
impl UITraitDefinition for UITraitLayoutDirection
impl UITraitDefinition for UITraitLegibilityWeight
impl UITraitDefinition for UITraitListEnvironment
Available on crate feature
UITraitListEnvironment only.impl UITraitDefinition for UITraitPreferredContentSizeCategory
impl UITraitDefinition for UITraitResolvesNaturalAlignmentWithBaseWritingDirection
impl UITraitDefinition for UITraitSceneCaptureState
impl UITraitDefinition for UITraitSplitViewControllerLayoutEnvironment
Available on crate feature
UISplitViewControllerLayoutEnvironment only.impl UITraitDefinition for UITraitTabAccessoryEnvironment
Available on crate feature
UITabAccessory only.