The search input box component can be placed in a non-specific location and is consistent with the default search input box style.
You can add MarkdownUI to an Xcode project by adding it as a package dependency.
- From the File menu, select Add Packages…
- Enter https://github.com/jaywcjlove/swiftui-searchfield the Search or Enter Package URL search field
- Link
Markdown
to your application target
Or add the following to Package.swift
:
.package(url: "https://github.com/jaywcjlove/swiftui-searchfield", from: "1.0.1")
import SearchField
struct ContentView: View {
@State private var searchText = ""
var body: some View {
SearchField(searchText, textFieldChanged: { value in
print("value\(value)")
searchText = value
})
Text(searchText)
}
}
Licensed under the MIT License.