NSMutableArray *arrWinUserIds = [[NSMutableArray alloc] initWithCapacity:0];
for (int i = 0; i < 2; i ++) {
NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithLongLong:100+i], @"uid", [NSNumber numberWithLongLong:200+i], @"score", nil];
[arrWinUserIds addObject:dic];
}
NSDictionary *dic2 = [arrWinUserIds objectAtIndex:0];
NSLog(@"%@", dic2);
NSNumber *numId = [dic2 objectForKey:@"uid"];
NSNumber *numScore = [dic2 objectForKey:@"score"];
NSLog(@"%lld, %lld", numId.longLongValue, numScore.longLongValue);
NSMutableArray和NSDictionary笔记
最新推荐文章于 2020-08-07 11:22:20 发布