Skip to content

Commit

Permalink
Merge pull request #48 from 94haox/master
Browse files Browse the repository at this point in the history
fix crash when dismissKeyboard was call
  • Loading branch information
styrken authored Aug 13, 2020
2 parents cca012d + 1fe74bd commit 179c08a
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 179c08a

Please sign in to comment.