1
我得到这个警告,我不知道如何解决它。在那里我得到警告线是初始化使整数没有铸造
NSInteger thescore = [[myDictionary objectForKey:@"Score"] objectAtIndex:0];
如果它的确与众不同,myDictionary是的NSDictionary
编辑:这是怎么回事?顺便说一句我的数组是一个NSMutableArray的,而不是一个NSArray的
NSInteger thescore = [[myDictionary valueForKey:@"Score"] integerValue];
编辑2: @Bavarious提到,我应该做到以下几点:
int thescore = [[myDictionary objectForKey:@"Score"] integerValue];
+1。也可以这样做:[[[objectEdKey:@“score”] objectAtIndex:0] integerValue];'并将结果赋给一个'NSInteger'。 – 2011-06-05 06:08:46
+1 ..... Josh :) – Legolas 2011-06-05 06:09:38
这是怎么回事?顺便说一句,它是一个NSMutableArray回应答复者。 – 2011-06-05 06:14:09