iOS: Use interactive keyboard dismissal
This commit is contained in:
parent
6b98d55f59
commit
cf1574c54a
|
@ -34,6 +34,7 @@ struct ContentView: View {
|
|||
|
||||
bottomBar
|
||||
}
|
||||
.onAppear(perform: tweakAppearance)
|
||||
.onReceive(navigator.$currentURL, perform: { (new) in
|
||||
urlFieldContents = new.absoluteString
|
||||
})
|
||||
|
@ -104,6 +105,10 @@ struct ContentView: View {
|
|||
.padding(.top, 4)
|
||||
}
|
||||
|
||||
private func tweakAppearance() {
|
||||
UIScrollView.appearance().keyboardDismissMode = .interactive
|
||||
}
|
||||
|
||||
private func commitURL() {
|
||||
guard let url = URL(string: urlFieldContents) else { return }
|
||||
navigator.changeURL(url)
|
||||
|
|
Loading…
Reference in New Issue