如何将jsonmodel对象添加到NSArray

时间:2013-04-28 08:39:57

标签: ios jsonmodel

我正在使用jsonmodel:

- (NSMutableArray *)ChildIntRecursiveWithChannels:(Channels *)channels  
                                           depths:(NSMutableArray *)depths 
                                           number:(int)number {

    NSLog(@"channels.name:%@",channels.name);

    [nodeArray addObject:channels]; 

    return  depths;
}

我正在获取日志:channels.name:aaaa,但从频道获取频道为空;

我修改了

- (NSMutableArray *)ChildIntRecursiveWithChannels:(Channels *)channels  
                                           depths:(NSMutableArray *)depths 
                                           number:(int)number {

    Channels * tempChannels ;

    tempChannels.name=channels.name;
    NSLog(@"tempChannels.name:%@",tempChannels.name);

    return  depths;
}

但是tempChannels.name也是null,你可以提一些建议吗?

0 个答案:

没有答案