I have been looking for a tutorial that integrates UISearchBar and UITextView and nothing is available. This makes me wonder, is this possible? I have wrote the following code:
- (IBAction)fileAction:(id)sender {
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"LICENSE" ofType:@"txt"];
[textView setText:[NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]];
}
Where I am reading the document named License.txt
I want to integrate a Search Bar to the View, but how do I make it work? How can I display the results of the search within the Text File? Is this possible? Can anyone provide me with a sample code of this integration?