我正在复制一个像这样的可变数组:
//copy players' info into playerList from a dictionary
playerList = [[NSMutableArray alloc] initWithArray:[params objectForKey:@"p"] copyItems:YES];
数组中的项目像这样实现 copyWithZone:
- (id)copyWithZone:(NSZone *)zone
{
PlayerInfo* copy = [[[self class] allocWithZone:zone] init];
[copy setNick:[self nick]];
...
[copy setIsChallengedByMe:[self isChallengedByMe]];
return copy;
}
但是, playerList 似乎只有“超出范围”的对象。我究竟做错了什么?