Skip to content

Commit

Permalink
fix crash when dismissKeyboard was call
Browse files Browse the repository at this point in the history
  • Loading branch information
94haox committed Jul 14, 2020
1 parent 9b905dc commit 1fe74bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/PartialSheet/PartialSheetViewModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ extension PartialSheet {
/// Dismiss the keyboard
private func dismissKeyboard() {
let resign = #selector(UIResponder.resignFirstResponder)
UIApplication.shared.sendAction(resign, to: nil, from: nil, for: nil)
DispatchQueue.main.async {
UIApplication.shared.sendAction(resign, to: nil, from: nil, for: nil)
}
}
}

Expand Down

0 comments on commit 1fe74bd

Please sign in to comment.