I have the following code in my viewDidLoad meathod:
list of names is declared in the header file as:
For some reason the console output is what I expected, a list of names but no values are being added to the array. I put a breakpoint in at the end of viewDidLoad and the array has zero entries. Does anyone know where i am going wrong here?
Code:
for (id key in dictionary) {
NSString *name;
name = [dictionary valueForKey:@"name"];
[listOfNames addObject:name];
NSLog(name);
}
list of names is declared in the header file as:
Code:
@interface RootViewController : UITableViewController {
NSMutableArray *listOfNames;
}
@property (nonatomic, retain) NSMutableArray *listOfNames;
@end