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§
fn traitCollection(&self) -> Retained<UITraitCollection>
Sourceunsafe fn traitCollectionDidChange(
&self,
previous_trait_collection: Option<&UITraitCollection>,
)
👎Deprecated: Use the trait change registration APIs declared in the UITraitChangeObservable protocol
unsafe fn traitCollectionDidChange( &self, previous_trait_collection: Option<&UITraitCollection>, )
To be overridden as needed to provide custom behavior when the environment’s traits change.
Trait Implementations§
Source§impl ProtocolType for dyn UITraitEnvironment
impl ProtocolType for dyn UITraitEnvironment
impl<T> ImplementedBy<T> for dyn UITraitEnvironment
Implementations on Foreign Types§
impl<T> UITraitEnvironment for ProtocolObject<T>where
T: ?Sized + UITraitEnvironment,
Implementors§
impl UITraitEnvironment for UIActionSheet
Available on crate feature
UIActionSheet
only.impl UITraitEnvironment for UIActivityIndicatorView
Available on crate feature
UIActivityIndicatorView
only.impl UITraitEnvironment for UIActivityViewController
Available on crate feature
UIActivityViewController
only.impl UITraitEnvironment for UIAlertController
Available on crate feature
UIAlertController
only.impl UITraitEnvironment for UIAlertView
Available on crate feature
UIAlertView
only.impl UITraitEnvironment for UIButton
Available on crate feature
UIButton
only.impl UITraitEnvironment for UICalendarView
Available on crate feature
UICalendarView
only.impl UITraitEnvironment for UICloudSharingController
Available on crate feature
UICloudSharingController
only.impl UITraitEnvironment for UICollectionReusableView
Available on crate feature
UICollectionViewCell
only.impl UITraitEnvironment for UICollectionView
Available on crate feature
UICollectionView
only.impl UITraitEnvironment for UICollectionViewCell
Available on crate feature
UICollectionViewCell
only.impl UITraitEnvironment for UICollectionViewController
Available on crate feature
UICollectionViewController
only.impl UITraitEnvironment for UICollectionViewListCell
Available on crate feature
UICollectionViewListCell
only.impl UITraitEnvironment for UIColorPickerViewController
Available on crate feature
UIColorPickerViewController
only.impl UITraitEnvironment for UIColorWell
Available on crate feature
UIColorWell
only.impl UITraitEnvironment for UIControl
Available on crate feature
UIControl
only.impl UITraitEnvironment for UIDatePicker
Available on crate feature
UIDatePicker
only.impl UITraitEnvironment for UIDocumentBrowserViewController
Available on crate feature
UIDocumentBrowserViewController
only.impl UITraitEnvironment for UIDocumentMenuViewController
Available on crate feature
UIDocumentMenuViewController
only.impl UITraitEnvironment for UIDocumentPickerExtensionViewController
Available on crate feature
UIDocumentPickerExtensionViewController
only.impl UITraitEnvironment for UIDocumentPickerViewController
Available on crate feature
UIDocumentPickerViewController
only.impl UITraitEnvironment for UIDocumentViewController
Available on crate feature
UIDocumentViewController
only.impl UITraitEnvironment for UIEventAttributionView
Available on crate feature
UIEventAttributionView
only.impl UITraitEnvironment for UIFontPickerViewController
Available on crate feature
UIFontPickerViewController
only.impl UITraitEnvironment for UIImagePickerController
Available on crate feature
UIImagePickerController
only.impl UITraitEnvironment for UIImageView
Available on crate feature
UIImageView
only.impl UITraitEnvironment for UIInputView
Available on crate feature
UIInputView
only.impl UITraitEnvironment for UIInputViewController
Available on crate feature
UIInputViewController
only.impl UITraitEnvironment for UILabel
Available on crate feature
UILabel
only.impl UITraitEnvironment for UIListContentView
Available on crate feature
UIListContentConfiguration
only.impl UITraitEnvironment for UIPageControl
Available on crate feature
UIPageControl
only.impl UITraitEnvironment for UIPageViewController
Available on crate feature
UIPageViewController
only.impl UITraitEnvironment for UIPasteControl
Available on crate feature
UIPasteControl
only.impl UITraitEnvironment for UIPickerView
Available on crate feature
UIPickerView
only.impl UITraitEnvironment for UIPopoverBackgroundView
Available on crate feature
UIPopoverBackgroundView
only.impl UITraitEnvironment for UIPopoverPresentationController
Available on crate feature
UIPopoverPresentationController
only.impl UITraitEnvironment for UIPresentationController
Available on crate feature
UIPresentationController
only.impl UITraitEnvironment for UIProgressView
Available on crate feature
UIProgressView
only.impl UITraitEnvironment for UIReferenceLibraryViewController
Available on crate feature
UIReferenceLibraryViewController
only.impl UITraitEnvironment for UIRefreshControl
Available on crate feature
UIRefreshControl
only.impl UITraitEnvironment for UIScreen
Available on crate feature
UIScreen
only.impl UITraitEnvironment for UIScrollView
Available on crate feature
UIScrollView
only.impl UITraitEnvironment for UISearchBar
Available on crate feature
UISearchBar
only.impl UITraitEnvironment for UISearchContainerViewController
Available on crate feature
UISearchContainerViewController
only.impl UITraitEnvironment for UISearchController
Available on crate feature
UISearchController
only.impl UITraitEnvironment for UISearchTextField
Available on crate feature
UISearchTextField
only.impl UITraitEnvironment for UISegmentedControl
Available on crate feature
UISegmentedControl
only.impl UITraitEnvironment for UISheetPresentationController
Available on crate feature
UISheetPresentationController
only.impl UITraitEnvironment for UISlider
Available on crate feature
UISlider
only.impl UITraitEnvironment for UISplitViewController
Available on crate feature
UISplitViewController
only.impl UITraitEnvironment for UIStackView
Available on crate feature
UIStackView
only.impl UITraitEnvironment for UIStandardTextCursorView
Available on crate feature
UIStandardTextCursorView
only.impl UITraitEnvironment for UIStepper
Available on crate feature
UIStepper
only.impl UITraitEnvironment for UISwitch
Available on crate feature
UISwitch
only.impl UITraitEnvironment for UITabBar
Available on crate feature
UITabBar
only.impl UITraitEnvironment for UITabBarController
Available on crate feature
UITabBarController
only.impl UITraitEnvironment for UITableView
Available on crate feature
UITableView
only.impl UITraitEnvironment for UITableViewCell
Available on crate feature
UITableViewCell
only.impl UITraitEnvironment for UITableViewController
Available on crate feature
UITableViewController
only.impl UITraitEnvironment for UITextField
Available on crate feature
UITextField
only.impl UITraitEnvironment for UITextFormattingViewController
Available on crate feature
UITextFormattingViewController
only.impl UITraitEnvironment for UITextView
Available on crate feature
UITextView
only.impl UITraitEnvironment for UIToolbar
Available on crate feature
UIToolbar
only.impl UITraitEnvironment for UIVideoEditorController
Available on crate feature
UIVideoEditorController
only.impl UITraitEnvironment for UIView
Available on crate feature
UIView
only.impl UITraitEnvironment for UIViewController
Available on crate feature
UIViewController
only.impl UITraitEnvironment for UIVisualEffectView
Available on crate feature
UIVisualEffectView
only.impl UITraitEnvironment for UIWebView
Available on crate feature
UIWebView
only.impl UITraitEnvironment for UIWindow
Available on crate feature
UIWindow
only.impl UITraitEnvironment for UIWindowScene
Available on crate feature
UIWindowScene
only.