pub unsafe trait UITraitDefinition: MainThreadOnly {
// Provided methods
unsafe fn identifier(mtm: MainThreadMarker) -> Retained<NSString>
where Self: Sized + ClassType { ... }
unsafe fn name(mtm: MainThreadMarker) -> Retained<NSString>
where Self: Sized + ClassType { ... }
unsafe fn affectsColorAppearance(mtm: MainThreadMarker) -> bool
where Self: Sized + ClassType { ... }
}
Available on crate feature
UITrait
only.Expand description
Provided Methods§
Sourceunsafe fn identifier(mtm: MainThreadMarker) -> Retained<NSString>
unsafe 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.
Sourceunsafe fn name(mtm: MainThreadMarker) -> Retained<NSString>
unsafe 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.
Sourceunsafe fn affectsColorAppearance(mtm: MainThreadMarker) -> bool
unsafe 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 UITraitHorizontalSizeClass
impl UITraitDefinition for UITraitImageDynamicRange
impl UITraitDefinition for UITraitLayoutDirection
impl UITraitDefinition for UITraitLegibilityWeight
impl UITraitDefinition for UITraitListEnvironment
Available on crate feature
UITraitListEnvironment
only.