点击空白区域隐藏键盘
This commit is contained in:
@@ -40,6 +40,9 @@ struct FormatterView: View {
|
||||
.padding()
|
||||
.navigationTitle("文案格式化")
|
||||
.background(Color(hex: "f2f2f7").ignoresSafeArea())
|
||||
.onTapGesture {
|
||||
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
|
||||
}
|
||||
.navigationDestination(item: $resultText) { text in
|
||||
ResultView(formattedText: text)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user