if ([elementName isEqualToString:@"record"]) {
[records addObject:[currentDictionary mutableCopy]];
NSInteger size = [records count];
NSLog(@"Current array size %d",size);
开发者_Go百科 [currentDictionary release];
}
The above code won't add the NSMutableDictionary object to the NSMutableArray. The Log displays '0' as the size of the array.
Please alloc the "records" array using the code
records = [[NSMutableArray alloc] init];
in ViewDidLoad().
精彩评论