开发者

NSNumbers in archived array dissappear

Okay I've made an array of NSNumber objects that I've stored into an NSMutableArray. When the game loads it's unarchived and retained but all the NSNumber objects are gone. Here's my code:

times = [[NSMutableArray alloc] initWithObjects:[[NSNumber alloc] initWithFloat:time],nil];
[NSKeyedArchiver archiveRootObject:times toFile:@"times"];
...

NSMutableArray *newTimes = [[NSKeyedUnarchiver unarchiveObjectWithFile:@"times"] retain];
times = [[NSMutableArray alloc] ini开发者_如何学PythontWithArray:newTimes];
[newTimes release];

Please help.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜