From 6ae7dfa838b6c0a7c509006f9f382ffab07959d9 Mon Sep 17 00:00:00 2001 From: Javier Heisekce Date: Wed, 8 Apr 2020 10:13:34 -0400 Subject: [PATCH] Borra reimplementacion de funciones de searchbar --- ContactsApp/ContactsViewController.swift | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ContactsApp/ContactsViewController.swift b/ContactsApp/ContactsViewController.swift index a25ce11..6876595 100644 --- a/ContactsApp/ContactsViewController.swift +++ b/ContactsApp/ContactsViewController.swift @@ -21,6 +21,7 @@ class ContactsViewController: UIViewController { super.viewDidLoad() contactsTable.register(UINib(nibName: "ContactSection", bundle: nil), forHeaderFooterViewReuseIdentifier: "headerId") importContacts() + searchBar.delegate = self contactsTable.tableFooterView = UIView(frame: .zero) searchBar.placeholder = NSLocalizedString("Nombre...", comment: "") } @@ -151,15 +152,6 @@ extension ContactsViewController: UISearchBarDelegate, UISearchDisplayDelegate, } - func searchBarTextDidEndEditing(_ searchBar: UISearchBar) { - self.searchBar.showsCancelButton = false - } - - func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) { - self.searchBar.showsCancelButton = true - self.searchBar.resignFirstResponder() - } - func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { print(searchText) } -- libgit2 0.26.0