I'm making an iPhone app which displays information about red wines. The wines are stored in a plist containing an array of dictionaries. I'm adding a search view controller to the application, and to start up easy I want to get the wines who the value for the "Name" key contains nameString (from textbox).
It kind of stops here, I need some advices about the most suitable way of doing this. Is there a function in the NSArray class which will do the job, should bring in NSPredicate, NSUserDefaults, or are there other options? I've done some research but I'm going to need some advices and maybe an example to get started.
I will advance the search function to let the user include/exclude countries, get wines that suit this and that food, set minimum price, maximum price, and so on. The dictionaries have strings for all this info. So before I start on something advanced like this I'll need some advice for which functions could do my job the best.
-(IBAction)searchButtonPoke:(id)sender{
NSString *path = [[NSBundle mainBundle] pathForResource:@"Wines" ofType:@"plist"];
allObjectsArray = [[NSMutableArray alloc] initWithContentsOfFile:path];
NSString *nameString = [NSString stringWithFormat:@"%@", [nameTextField text]];
resultObjectsArray = /*objects where the value for the key "Name" contains
nameString*/;