# FerroView

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-ios/ferro_view/struct-ferroview/

**struct** · [`ferroui-ios`](/docs/0.5.0/api/ferroui-ios/) · v0.5.0

```rust
struct FerroView
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/iOS/FerroUI.iOS/ferro_view.rs#L86)

## Members

- [`new`](#function-new)
- [`is_driving_text`](#function-is_driving_text)
- [`text_input_responder`](#function-text_input_responder)
- [`marked_text`](#function-marked_text)
- [`top_level`](#function-top_level)
- [`content`](#function-content)
- [`set_content`](#function-set_content)
- [`dispose`](#function-dispose)
- [`frames_presented`](#function-frames_presented)
- [`frames_begun`](#function-frames_begun)
- [`pending_layout`](#function-pending_layout)

<a id="function-new"></a>

### new

```rust
fn new(mtm: MainThreadMarker) -> Retained<Self>
```

Creates a view with a top-level of its own, ready for content.
## Panics
Panics when the platform was not initialized (`use_ios`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/iOS/FerroUI.iOS/ferro_view.rs#L312)

<a id="function-is_driving_text"></a>

### is_driving_text

```rust
fn is_driving_text(self: &Self) -> bool
```

Whether a text input responder of this view is the first
responder: whether the keyboard writes into a client of this view.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/iOS/FerroUI.iOS/ferro_view.rs#L428)

<a id="function-text_input_responder"></a>

### text_input_responder

```rust
fn text_input_responder(self: &Self) -> Option<Retained<UIResponder>>
```

The responder UIKit sends the text of the keyboard to, while a
client of this view has the text input: an object that implements
`UITextInput`. An addition of the port, for an application that
tests itself.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/iOS/FerroUI.iOS/ferro_view.rs#L436)

<a id="function-marked_text"></a>

### marked_text

```rust
fn marked_text(self: &Self) -> Option<String>
```

The marked text of the text input responder of this view. An
addition of the port, for an application that tests itself.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/iOS/FerroUI.iOS/ferro_view.rs#L442)

<a id="function-top_level"></a>

### top_level

```rust
fn top_level(self: &Self) -> Ref<TopLevel>
```

The top-level of the view.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/iOS/FerroUI.iOS/ferro_view.rs#L515)

<a id="function-content"></a>

### content

```rust
fn content(self: &Self) -> Option<Ref<Control>>
```

The content of the view.
## Panics
Panics when the content of the top-level is not a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/iOS/FerroUI.iOS/ferro_view.rs#L534)

<a id="function-set_content"></a>

### set_content

```rust
fn set_content(self: &Self, value: Option<Ref<Control>>)
```

Sets the content of the view.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/iOS/FerroUI.iOS/ferro_view.rs#L543)

<a id="function-dispose"></a>

### dispose

```rust
fn dispose(self: &Self)
```

Releases the top-level of the view.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/iOS/FerroUI.iOS/ferro_view.rs#L548)

<a id="function-frames_presented"></a>

### frames_presented

```rust
fn frames_presented(self: &Self) -> u64
```

The number of frames that were presented on the layer of the view.
An addition of the port, for an application that tests itself.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/iOS/FerroUI.iOS/ferro_view.rs#L556)

<a id="function-frames_begun"></a>

### frames_begun

```rust
fn frames_begun(self: &Self) -> u64
```

The number of frames that were begun on the layer of the view (a
frame that was begun and not presented was not finished by the
renderer). An addition of the port, for diagnostics.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/iOS/FerroUI.iOS/ferro_view.rs#L563)

<a id="function-pending_layout"></a>

### pending_layout

```rust
fn pending_layout(self: &Self) -> (PixelSize, f64)
```

The layout the next frame is drawn for: the size in pixels and the
scaling. An addition of the port, for diagnostics.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/iOS/FerroUI.iOS/ferro_view.rs#L569)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `AutoreleaseSafe`
- `MainThreadOnly`
- `RefEncode`
- `Message`
- `Deref`
- `AsRef<FerroView>`
- `AsRef<UIView>`
- `Borrow<UIView>`
- `AsRef<AnyObject>`
- `Borrow<AnyObject>`
- `ClassType`
- `DefinedClass`
- `DowncastTarget`
- `NSObjectProtocol`

## Availability

Extracted for `aarch64-apple-ios`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
