Closed ht22pt closed 8 years ago
I use ASTableNode for show some data and add one search bar with code in viewDidLoad
// create search controller self.searchController = UISearchController(searchResultsController: nil) self.searchController!.searchResultsUpdater = self self.searchController!.hidesNavigationBarDuringPresentation = false self.searchController!.dimsBackgroundDuringPresentation = false self.searchController!.definesPresentationContext = true self.searchController!.searchBar.sizeToFit() self.tableNode.view.tableHeaderView = searchController!.searchBar
and when searching
// MARK : - Search func filterContentForSearchText(searchText: String) { filterSavedPost = savedPost.filter({(post : Post) -> Bool in // Some check post data and return true or false }) self.tableNode.view.reloadData() }
And some image show in simulation
I found workaround solution for this issue:
func do_table_refresh() { dispatch_async(dispatch_get_main_queue(), { self.tableNode.view.reloadData() return }) }
I use ASTableNode for show some data and add one search bar with code in viewDidLoad
and when searching
And some image show in simulation