UITraitEnvironment

Trait UITraitEnvironment 

Source
pub unsafe trait UITraitEnvironment: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    fn traitCollection(&self) -> Retained<UITraitCollection>
       where Self: Sized + Message { ... }
    unsafe fn traitCollectionDidChange(
        &self,
        previous_trait_collection: Option<&UITraitCollection>,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature UITraitCollection only.
Expand description

Trait environments expose a trait collection that describes their environment.

See also Apple’s documentation

Provided Methods§

Source

fn traitCollection(&self) -> Retained<UITraitCollection>
where Self: Sized + Message,

Source

unsafe fn traitCollectionDidChange( &self, previous_trait_collection: Option<&UITraitCollection>, )
where Self: Sized + Message,

👎Deprecated: Use the trait change registration APIs declared in the UITraitChangeObservable protocol

To be overridden as needed to provide custom behavior when the environment’s traits change.

Trait Implementations§

Source§

impl ProtocolType for dyn UITraitEnvironment

Source§

const NAME: &'static str = "UITraitEnvironment"

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 UITraitEnvironment

Implementations on Foreign Types§

Source§

impl<T> UITraitEnvironment for ProtocolObject<T>

Implementors§

Source§

impl UITraitEnvironment for UIActionSheet

Available on crate feature UIActionSheet only.
Source§

impl UITraitEnvironment for UIActivityIndicatorView

Available on crate feature UIActivityIndicatorView only.
Source§

impl UITraitEnvironment for UIActivityViewController

Available on crate feature UIActivityViewController only.
Source§

impl UITraitEnvironment for UIAlertController

Available on crate feature UIAlertController only.
Source§

impl UITraitEnvironment for UIAlertView

Available on crate feature UIAlertView only.
Source§

impl UITraitEnvironment for UIButton

Available on crate feature UIButton only.
Source§

impl UITraitEnvironment for UICalendarView

Available on crate feature UICalendarView only.
Source§

impl UITraitEnvironment for UICloudSharingController

Available on crate feature UICloudSharingController only.
Source§

impl UITraitEnvironment for UICollectionReusableView

Available on crate feature UICollectionViewCell only.
Source§

impl UITraitEnvironment for UICollectionView

Available on crate feature UICollectionView only.
Source§

impl UITraitEnvironment for UICollectionViewCell

Available on crate feature UICollectionViewCell only.
Source§

impl UITraitEnvironment for UICollectionViewController

Available on crate feature UICollectionViewController only.
Source§

impl UITraitEnvironment for UICollectionViewListCell

Available on crate feature UICollectionViewListCell only.
Source§

impl UITraitEnvironment for UIColorPickerViewController

Available on crate feature UIColorPickerViewController only.
Source§

impl UITraitEnvironment for UIColorWell

Available on crate feature UIColorWell only.
Source§

impl UITraitEnvironment for UIContentUnavailableView

Available on crate feature UIContentUnavailableView only.
Source§

impl UITraitEnvironment for UIControl

Available on crate feature UIControl only.
Source§

impl UITraitEnvironment for UIDatePicker

Available on crate feature UIDatePicker only.
Source§

impl UITraitEnvironment for UIDocumentBrowserViewController

Available on crate feature UIDocumentBrowserViewController only.
Source§

impl UITraitEnvironment for UIDocumentMenuViewController

Available on crate feature UIDocumentMenuViewController only.
Source§

impl UITraitEnvironment for UIDocumentPickerExtensionViewController

Available on crate feature UIDocumentPickerExtensionViewController only.
Source§

impl UITraitEnvironment for UIDocumentPickerViewController

Available on crate feature UIDocumentPickerViewController only.
Source§

impl UITraitEnvironment for UIDocumentViewController

Available on crate feature UIDocumentViewController only.
Source§

impl UITraitEnvironment for UIEventAttributionView

Available on crate feature UIEventAttributionView only.
Source§

impl UITraitEnvironment for UIFontPickerViewController

Available on crate feature UIFontPickerViewController only.
Source§

impl UITraitEnvironment for UIImagePickerController

Available on crate feature UIImagePickerController only.
Source§

impl UITraitEnvironment for UIImageView

Available on crate feature UIImageView only.
Source§

impl UITraitEnvironment for UIInputView

Available on crate feature UIInputView only.
Source§

impl UITraitEnvironment for UIInputViewController

Available on crate feature UIInputViewController only.
Source§

impl UITraitEnvironment for UILabel

Available on crate feature UILabel only.
Source§

impl UITraitEnvironment for UIListContentView

Available on crate feature UIListContentConfiguration only.
Source§

impl UITraitEnvironment for UINavigationBar

Available on crate feature UINavigationBar only.
Source§

impl UITraitEnvironment for UINavigationController

Available on crate feature UINavigationController only.
Source§

impl UITraitEnvironment for UIPageControl

Available on crate feature UIPageControl only.
Source§

impl UITraitEnvironment for UIPageViewController

Available on crate feature UIPageViewController only.
Source§

impl UITraitEnvironment for UIPasteControl

Available on crate feature UIPasteControl only.
Source§

impl UITraitEnvironment for UIPickerView

Available on crate feature UIPickerView only.
Source§

impl UITraitEnvironment for UIPopoverBackgroundView

Available on crate feature UIPopoverBackgroundView only.
Source§

impl UITraitEnvironment for UIPopoverPresentationController

Available on crate feature UIPopoverPresentationController only.
Source§

impl UITraitEnvironment for UIPresentationController

Available on crate feature UIPresentationController only.
Source§

impl UITraitEnvironment for UIProgressView

Available on crate feature UIProgressView only.
Source§

impl UITraitEnvironment for UIReferenceLibraryViewController

Available on crate feature UIReferenceLibraryViewController only.
Source§

impl UITraitEnvironment for UIRefreshControl

Available on crate feature UIRefreshControl only.
Source§

impl UITraitEnvironment for UIScreen

Available on crate feature UIScreen only.
Source§

impl UITraitEnvironment for UIScrollView

Available on crate feature UIScrollView only.
Source§

impl UITraitEnvironment for UISearchBar

Available on crate feature UISearchBar only.
Source§

impl UITraitEnvironment for UISearchContainerViewController

Available on crate feature UISearchContainerViewController only.
Source§

impl UITraitEnvironment for UISearchController

Available on crate feature UISearchController only.
Source§

impl UITraitEnvironment for UISearchTextField

Available on crate feature UISearchTextField only.
Source§

impl UITraitEnvironment for UISegmentedControl

Available on crate feature UISegmentedControl only.
Source§

impl UITraitEnvironment for UISheetPresentationController

Available on crate feature UISheetPresentationController only.
Source§

impl UITraitEnvironment for UISlider

Available on crate feature UISlider only.
Source§

impl UITraitEnvironment for UISplitViewController

Available on crate feature UISplitViewController only.
Source§

impl UITraitEnvironment for UIStackView

Available on crate feature UIStackView only.
Source§

impl UITraitEnvironment for UIStandardTextCursorView

Available on crate feature UIStandardTextCursorView only.
Source§

impl UITraitEnvironment for UIStepper

Available on crate feature UIStepper only.
Source§

impl UITraitEnvironment for UISwitch

Available on crate feature UISwitch only.
Source§

impl UITraitEnvironment for UITabBar

Available on crate feature UITabBar only.
Source§

impl UITraitEnvironment for UITabBarController

Available on crate feature UITabBarController only.
Source§

impl UITraitEnvironment for UITableView

Available on crate feature UITableView only.
Source§

impl UITraitEnvironment for UITableViewCell

Available on crate feature UITableViewCell only.
Source§

impl UITraitEnvironment for UITableViewController

Available on crate feature UITableViewController only.
Source§

impl UITraitEnvironment for UITableViewHeaderFooterView

Available on crate feature UITableViewHeaderFooterView only.
Source§

impl UITraitEnvironment for UITextField

Available on crate feature UITextField only.
Source§

impl UITraitEnvironment for UITextFormattingViewController

Available on crate feature UITextFormattingViewController only.
Source§

impl UITraitEnvironment for UITextView

Available on crate feature UITextView only.
Source§

impl UITraitEnvironment for UIToolbar

Available on crate feature UIToolbar only.
Source§

impl UITraitEnvironment for UIVideoEditorController

Available on crate feature UIVideoEditorController only.
Source§

impl UITraitEnvironment for UIView

Available on crate feature UIView only.
Source§

impl UITraitEnvironment for UIViewController

Available on crate feature UIViewController only.
Source§

impl UITraitEnvironment for UIVisualEffectView

Available on crate feature UIVisualEffectView only.
Source§

impl UITraitEnvironment for UIWebView

Available on crate feature UIWebView only.
Source§

impl UITraitEnvironment for UIWindow

Available on crate feature UIWindow only.
Source§

impl UITraitEnvironment for UIWindowScene

Available on crate feature UIWindowScene only.