在我将对象添加到我之后NSMutableArray
它变成nil
(我签入NSLog
)
代码
guests = [[NSMutableArray alloc]init];
guests = [localDictionary objectForKey:@"guestsArray"];
[guests addObject:@"1"];
[guests addObject:@"12"];
[guests addObject:@"31"];
if(guests == nil)
{
NSLog(@"WHY?");
}
你有什么想法为什么会发生?我应该检查什么?