好的,我已经创建了一个我存储在NSMutableArray中的NSNumber对象数组。当游戏加载时,它被取消归档并保留,但所有NSNumber对象都消失了。这是我的代码:
times = [[NSMutableArray alloc] initWithObjects:[[NSNumber alloc] initWithFloat:time],nil];
[NSKeyedArchiver archiveRootObject:times toFile:@"times"];
...
NSMutableArray *newTimes = [[NSKeyedUnarchiver unarchiveObjectWithFile:@"times"] retain];
times = [[NSMutableArray alloc] initWithArray:newTimes];
[newTimes release];
请帮忙。