MapMapM 2013-02-03 02:42 采纳率: 0%
浏览 2332

NSMutableDictionary的问题

IOS开发代码:

listOfItems NSMutableArray声明:

@interface SAMasterViewController () {
    NSMutableArray *listOfItems;
}
@end

现在,有一部分代码报出错误:EXC_BAD_ACCESS (code=1, address=0x5fc260000),出在最后一行individual_data对象中。

listOfItems = [[NSMutableArray alloc] init];
for(NSDictionary *tweetDict in statuses) {
    NSString  *text          = [tweetDict objectForKey:@"text"];
    NSString  *screenName    = [[tweetDict objectForKey:@"user"] objectForKey:@"screen_name"];
    NSString  *img_url       = [[tweetDict objectForKey:@"user"] objectForKey:@"profile_image_url"];
    NSInteger unique_id      = [[tweetDict objectForKey:@"id"] intValue];
    NSInteger user_id        = [[[tweetDict objectForKey:@"user"] objectForKey:@"id"] intValue ];

    NSMutableDictionary *individual_data = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                            text, @"text_tweet",
                                            screenName,@"user_name",
                                            img_url, @"img_url",
                                            unique_id, @"unique_id",
                                            user_id, @"user_id", nil];
    [listOfItems addObject:individual_data];
}
  • 写回答

1条回答

  • shiter 人工智能领域优质创作者 2015-01-13 15:42
    关注

    你可以参考一下这个帖子的解决办法:
    http://www.cocoachina.com/bbs/read.php?tid=100505

    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记