Skip to content

Commit 223afc7

Browse files
author
Achyut Kumar M
committed
add tap gesture to dismissKeyboard
1 parent 912f222 commit 223afc7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

GoInfoGame/GoInfoGame/quests/LongQuests/View/LongForm.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ struct LongForm: View, QuestForm {
214214
}
215215
}
216216
}
217+
.onTapGesture {
218+
print("DISMISS KEYBAORD")
219+
//hide keyboard if keyboard is open
220+
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
221+
}
217222
}
218223
.onChange(of: capturedImage) { newValue in
219224
if newValue != nil {

0 commit comments

Comments
 (0)