I currently have a UISearchBar that works fine, however, I've noticed that when entering apostrophes in the searchBar it does not return any results. For example: If I have a String: Bob's if I search Bob it returns said string, however, as soon as I enter the apostrophe in the searchBar: Bob' the searchBar returns no results.
I've searched online for solutions, however, have not found anything that works. Any response would be greatly appreciated, thanks.
UISearchBar Code:
I've searched online for solutions, however, have not found anything that works. Any response would be greatly appreciated, thanks.
UISearchBar Code:
Code Block func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { if searchText.isEmpty { filteredData = data } else { filteredData = data.filter{$0.title.range(of: searchText, options: .caseInsensitive) != nil } } self.tableView.reloadData() } }