diff --git a/Pods/EPContactsPicker.swift b/Pods/EPContactsPicker.swift index d4d333b..3d1ade2 100644 --- a/Pods/EPContactsPicker.swift +++ b/Pods/EPContactsPicker.swift @@ -49,6 +49,8 @@ open class EPContactsPicker: UITableViewController, UISearchResultsUpdating, UIS var subtitleCellValue = SubtitleCellValue.phoneNumber var multiSelectEnabled: Bool = false //Default is single selection contact + var isPresentingSearch: Bool = false + // MARK: - Lifecycle Methods override open func viewDidLoad() { @@ -334,7 +336,11 @@ open class EPContactsPicker: UITableViewController, UISearchResultsUpdating, UIS func onTouchDoneButton() { dismiss(animated: true, completion: { - self.contactDelegate?.epContactPicker(self, didSelectMultipleContacts: self.selectedContacts) + if self.isPresentingSearch { + self.isPresentingSearch = false + } else { + self.contactDelegate?.epContactPicker(self, didSelectMultipleContacts: self.selectedContacts) + } }) } @@ -373,4 +379,8 @@ open class EPContactsPicker: UITableViewController, UISearchResultsUpdating, UIS }) } + open func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) { + self.isPresentingSearch = true + } + }