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;
}
ios_platform
only.Expand description
Additional methods on WindowAttributes
that are specific to iOS.
Required Methods§
sourcefn with_scale_factor(self, scale_factor: f64) -> Self
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()
.
sourcefn with_valid_orientations(self, valid_orientations: ValidOrientations) -> Self
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]
.
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+.
sourcefn with_preferred_screen_edges_deferring_system_gestures(
self,
edges: ScreenEdge
) -> Self
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+.
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]
.
sourcefn with_preferred_status_bar_style(
self,
status_bar_style: StatusBarStyle
) -> Self
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]
,