Function root_view Copy item path Source pub fn root_view(builder: fn (i64 ) -> ViewHandle ) -> ViewHandle Expand description Build the application’s root view, or return the one already built.
builder receives the current generation, which most callers ignore: the
point is that it runs again whenever refresh is called, and reads
whatever Rust state holds at that moment.
Must be called on the main thread.
98 fn content_view() -> swiftui_native::ViewHandle {
99 state::root_view (|_ | body().into_handle())
100 }More examples Hide additional examples
122 fn content_view() -> swiftui_native::ViewHandle {
123 state::root_view (|_ | body().into_handle())
124 }120 fn content_view() -> swiftui_native::ViewHandle {
121 state::root_view (|_ | body().into_handle())
122 }131 fn content_view() -> swiftui_native::ViewHandle {
132 state::root_view (|_ | body().into_handle())
133 }examples/swift_org_tutorial.rs (
line 176 )
175 fn content_view() -> swiftui_native::ViewHandle {
176 state::root_view (|_generation| body().into_handle())
177 }82 fn content_view() -> swiftui_native::ViewHandle {
83 swiftui_native::state::root_view (|_ | body().into_handle())
84 }Additional examples can be found in: