0
votes

i’m trying to realize a search bar with a TableView. Everything is working like this: when i touch the search bar for add text the TabeView(before hidden) compare with the auto compilator and there i write. What i’m trying to do is hide the TableView when i tap the button cancel and hide again the tableView but is not working correct because after that i tap cancel and my table hide as i want then i can’t TableView is not working. I tried using "tableview is hidden when cancel button clicked" but my table doesn't work later. How can i do? Do you have some ideas? Thank you guys

    func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
    searching = false
    searchBar.text = ""
    TableVieww.reloadData()
    TableVieww.isHidden = true
}
1
edit your question to add code - don't put it in comments. - Ashley Mills

1 Answers

0
votes

Try:

TableVieww.layer.alpha = 0.0