UITraitDefinition

Trait UITraitDefinition 

Source
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§

Source

fn identifier(mtm: MainThreadMarker) -> Retained<NSString>
where Self: Sized + ClassType,

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.

Source

fn name(mtm: MainThreadMarker) -> Retained<NSString>
where Self: Sized + ClassType,

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.

Source

fn affectsColorAppearance(mtm: MainThreadMarker) -> bool
where Self: Sized + ClassType,

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

Source§

const NAME: &'static str = "UITraitDefinition"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn UITraitDefinition

Implementations on Foreign Types§

Source§

impl<T> UITraitDefinition for ProtocolObject<T>

Implementors§

Source§

impl UITraitDefinition for UITraitAccessibilityContrast

Source§

impl UITraitDefinition for UITraitActiveAppearance

Source§

impl UITraitDefinition for UITraitDisplayGamut

Source§

impl UITraitDefinition for UITraitDisplayScale

Source§

impl UITraitDefinition for UITraitForceTouchCapability

Source§

impl UITraitDefinition for UITraitHDRHeadroomUsageLimit

Source§

impl UITraitDefinition for UITraitHorizontalSizeClass

Source§

impl UITraitDefinition for UITraitImageDynamicRange

Source§

impl UITraitDefinition for UITraitLayoutDirection

Source§

impl UITraitDefinition for UITraitLegibilityWeight

Source§

impl UITraitDefinition for UITraitListEnvironment

Available on crate feature UITraitListEnvironment only.
Source§

impl UITraitDefinition for UITraitPreferredContentSizeCategory

Source§

impl UITraitDefinition for UITraitResolvesNaturalAlignmentWithBaseWritingDirection

Source§

impl UITraitDefinition for UITraitSceneCaptureState

Source§

impl UITraitDefinition for UITraitSplitViewControllerLayoutEnvironment

Available on crate feature UISplitViewControllerLayoutEnvironment only.
Source§

impl UITraitDefinition for UITraitTabAccessoryEnvironment

Available on crate feature UITabAccessory only.
Source§

impl UITraitDefinition for UITraitToolbarItemPresentationSize

Source§

impl UITraitDefinition for UITraitTypesettingLanguage

Source§

impl UITraitDefinition for UITraitUserInterfaceIdiom

Source§

impl UITraitDefinition for UITraitUserInterfaceLevel

Source§

impl UITraitDefinition for UITraitUserInterfaceStyle

Source§

impl UITraitDefinition for UITraitVerticalSizeClass