- Code: Select all
- (void)searchBar:(UISearchBar *)searchBarControl textDidChange:(NSString *)searchText
{
NSString *query = [_searchBar.text stringByReplacingOccurrencesOfString:@"\'" withString:@"\\\'"];
[_webView performSelectorOnMainThread:@selector(stringByEvaluatingJavaScriptFromString:) withObject:[NSString stringWithFormat:@"searchUpdated('%@');", query] waitUntilDone:NO];
}
everything will work