开发者

NSMutableDictionary won't be added to NSMutableArray

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().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜