Problem/Issue: We wanted to highlight particular word in UIWeb View Control; in short we can say that we wanted to implement “Content Search” features in the application.
- Solution/Steps flow by you: I got some link from there I download one java script file and integrate in my Application. After integration that file I got solution for my feature. (For this feature your content must be store in html format).
- Reference link: Click this
- Sample code which you have written
[self highlightAllOccurencesOfString:[AppDelegate appDelegate].str_content_search];
// The JS File
NSString *filePath = [[NSBundle mainBundle] pathForResource:@”UIWebViewSearch” ofType:@”js” inDirectory:@””];
NSData *fileData = [NSData dataWithContentsOfFile:filePath];
NSString *jsString = [[NSMutableString alloc] initWithData:fileData encoding:NSUTF8StringEncoding];
//NSLog( @” view of tag OF tag both =%@”,getImageView1);
// The JS Function
NSString *startSearch = [NSString stringWithFormat:@”uiWebview_HighlightAllOccurencesOfString(‘%@’)”,str];
return [result integerValue];
- Screen shot:
Name of Application on iTunes: Healing with Foods
Contributed by: Keyur Bhalodiya, iPhone App Developer at Space-O Technologies.