Trait winit::platform::ios::WindowAttributesExtIOS

source ·
pub trait WindowAttributesExtIOS {
    // Required methods
    fn with_scale_factor(self, scale_factor: f64) -> Self;
    fn with_valid_orientations(
        self,
        valid_orientations: ValidOrientations
    ) -> Self;
    fn with_prefers_home_indicator_hidden(self, hidden: bool) -> Self;
    fn with_preferred_screen_edges_deferring_system_gestures(
        self,
        edges: ScreenEdge
    ) -> Self;
    fn with_prefers_status_bar_hidden(self, hidden: bool) -> Self;
    fn with_preferred_status_bar_style(
        self,
        status_bar_style: StatusBarStyle
    ) -> Self;
}
Available on ios_platform only.
Expand description

Additional methods on WindowAttributes that are specific to iOS.

Required Methods§

source

fn with_scale_factor(self, scale_factor: f64) -> Self

Sets the contentScaleFactor of the underlying UIWindow to scale_factor.

The default value is device dependent, and it’s recommended GLES or Metal applications set this to MonitorHandle::scale_factor().

source

fn with_valid_orientations(self, valid_orientations: ValidOrientations) -> Self

Sets the valid orientations for the Window.

The default value is ValidOrientations::LandscapeAndPortrait.

This sets the initial value returned by -[UIViewController supportedInterfaceOrientations].

source

fn with_prefers_home_indicator_hidden(self, hidden: bool) -> Self

Sets whether the Window prefers the home indicator hidden.

The default is to prefer showing the home indicator.

This sets the initial value returned by -[UIViewController prefersHomeIndicatorAutoHidden].

This only has an effect on iOS 11.0+.

source

fn with_preferred_screen_edges_deferring_system_gestures( self, edges: ScreenEdge ) -> Self

Sets the screen edges for which the system gestures will take a lower priority than the application’s touch handling.

This sets the initial value returned by -[UIViewController preferredScreenEdgesDeferringSystemGestures].

This only has an effect on iOS 11.0+.

source

fn with_prefers_status_bar_hidden(self, hidden: bool) -> Self

Sets whether the Window prefers the status bar hidden.

The default is to prefer showing the status bar.

This sets the initial value returned by -[UIViewController prefersStatusBarHidden].

source

fn with_preferred_status_bar_style( self, status_bar_style: StatusBarStyle ) -> Self

Sets the style of the Window’s status bar.

The default is system-defined.

This sets the initial value returned by -[UIViewController preferredStatusBarStyle],

Object Safety§

This trait is not object safe.

Implementors§