Skip to main content

ViewControllerState

Struct ViewControllerState 

Source
pub struct ViewControllerState { /* private fields */ }
Expand description

The state of the default view controller: what the view of the port holds of it. The view controller object of UIKit forwards to it.

Implementations§

Source§

impl ViewControllerState

Source

pub fn new(needs_status_bar_appearance_update: Box<dyn Fn()>) -> Rc<Self>

Creates the state; needs_status_bar_appearance_update is called when a property of the status bar was set.

Source

pub fn preferred_status_bar_style_override(&self) -> Option<StatusBarStyle>

The style that was set, if one was.

Source

pub fn prefers_status_bar_hidden_or(&self, base: impl FnOnce() -> bool) -> bool

Whether the status bar is hidden; the first call takes the answer of the system (base) and keeps it.

Source

pub fn view_did_layout_subviews(&self, size: Size, frame: Rect)

Called when the view was laid out, with its size and the frame of its safe area layout guide.

Trait Implementations§

Source§

impl IFerroViewController for ViewControllerState

Source§

fn preferred_status_bar_style(&self) -> StatusBarStyle

The preferred style of the status bar.
Source§

fn set_preferred_status_bar_style(&self, value: StatusBarStyle)

Sets the preferred style of the status bar.
Source§

fn prefers_status_bar_hidden(&self) -> bool

Whether the status bar is hidden.
Source§

fn set_prefers_status_bar_hidden(&self, value: bool)

Hides or shows the status bar.
Source§

fn safe_area_padding(&self) -> Thickness

The padding that keeps content out of the areas the system covers.
Source§

fn safe_area_padding_changed( &self, handler: Rc<dyn Fn()>, ) -> Rc<dyn IDisposable>

The safe area padding changed.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.