I am new to tableViews and dictionaries and i have a problem!
In ViewDidLoad i am initializing many MutableArrays and i am adding data using NSDictionary. Example:
- (void)viewDidLoad {
nomosXiou=[[NSMutableArray alloc] init];
[nomosXiou addObject:[[NSDictionary alloc] initWithObjectsAndKeys:@"Mary",@"name",@"USA",@"country", nil]];
[nomosXiou addObject:[[NSDictionary alloc] initWithObjectsAndKeys:@"Peter",@"name",@"Germany",@"country", nil]];
[super viewDidLoad];
// Do any additional setup after loading the view.}
In a previous ViewController the user selects a Country. Based on that selection, how could i remove from my arrays all the other entries???
Thanks in advance…
First note that your code fragment has an error. It should read:
There are a number of ways to do what you want, but the most straightforward is probably the following:
When this is done
newNomosXiouwill contain only the entries innomosXiouthat are from the country set incountryName.