Trait winit::platform::ios::WindowExtIOS

source ·
pub trait WindowExtIOS {
    // Required methods
    fn set_scale_factor(&self, scale_factor: f64);
    fn set_valid_orientations(&self, valid_orientations: ValidOrientations);
    fn set_prefers_home_indicator_hidden(&self, hidden: bool);
    fn set_preferred_screen_edges_deferring_system_gestures(
        &self,
        edges: ScreenEdge
    );
    fn set_prefers_status_bar_hidden(&self, hidden: bool);
    fn set_preferred_status_bar_style(&self, status_bar_style: StatusBarStyle);
    fn recognize_pinch_gesture(&self, should_recognize: bool);
    fn recognize_pan_gesture(
        &self,
        should_recognize: bool,
        minimum_number_of_touches: u8,
        maximum_number_of_touches: u8
    );
    fn recognize_doubletap_gesture(&self, should_recognize: bool);
    fn recognize_rotation_gesture(&self, should_recognize: bool);
}
Available on ios_platform only.
Expand description

Additional methods on Window that are specific to iOS.

Required Methods§

source

fn set_scale_factor(&self, scale_factor: f64)

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 set_valid_orientations(&self, valid_orientations: ValidOrientations)

Sets the valid orientations for the Window.

The default value is ValidOrientations::LandscapeAndPortrait.

This changes the value returned by -[UIViewController supportedInterfaceOrientations], and then calls -[UIViewController attemptRotationToDeviceOrientation].

source

fn set_prefers_home_indicator_hidden(&self, hidden: bool)

Sets whether the Window prefers the home indicator hidden.

The default is to prefer showing the home indicator.

This changes the value returned by -[UIViewController prefersHomeIndicatorAutoHidden], and then calls -[UIViewController setNeedsUpdateOfHomeIndicatorAutoHidden].

This only has an effect on iOS 11.0+.

source

fn set_preferred_screen_edges_deferring_system_gestures( &self, edges: ScreenEdge )

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

This changes the value returned by -[UIViewController preferredScreenEdgesDeferringSystemGestures], and then calls -[UIViewController setNeedsUpdateOfScreenEdgesDeferringSystemGestures].

This only has an effect on iOS 11.0+.

source

fn set_prefers_status_bar_hidden(&self, hidden: bool)

Sets whether the Window prefers the status bar hidden.

The default is to prefer showing the status bar.

This sets the value of the prefersStatusBarHidden property.

setNeedsStatusBarAppearanceUpdate() is also called for you.

source

fn set_preferred_status_bar_style(&self, status_bar_style: StatusBarStyle)

Sets the preferred status bar style for the Window.

The default is system-defined.

This sets the value of the preferredStatusBarStyle property.

setNeedsStatusBarAppearanceUpdate() is also called for you.

source

fn recognize_pinch_gesture(&self, should_recognize: bool)

Sets whether the Window should recognize pinch gestures.

The default is to not recognize gestures.

source

fn recognize_pan_gesture( &self, should_recognize: bool, minimum_number_of_touches: u8, maximum_number_of_touches: u8 )

Sets whether the Window should recognize pan gestures.

The default is to not recognize gestures. Installs UIPanGestureRecognizer onto view

Set the minimum number of touches required: minimumNumberOfTouches

Set the maximum number of touches recognized: maximumNumberOfTouches

source

fn recognize_doubletap_gesture(&self, should_recognize: bool)

Sets whether the Window should recognize double tap gestures.

The default is to not recognize gestures.

source

fn recognize_rotation_gesture(&self, should_recognize: bool)

Sets whether the Window should recognize rotation gestures.

The default is to not recognize gestures.

Implementors§