Structure

SearchFieldPlacement

A structure which defines the placement of a search field in a view hierarchy.

Declaration 宣言

struct SearchFieldPlacement

Overview 概要

A preferred placement may be given to View/searchable(text:placement:) modifier.


var body: some View {
    NavigationView {
        PrimaryView()
        SecondaryView()
        Text("Select a primary and secondary item")
    }
    .searchable(text: $text, placement: .sidebar)
}

Depending on the containing view hierachy, the requested placement may not be able to be fulfilled.

Topics 話題

Structures 構造体

Type Properties 型プロパティ

Type Methods 型メソッド

See Also 参照

Search