美文网首页
Terminating app due to uncaught

Terminating app due to uncaught

作者: 拂溪 | 来源:发表于2019-11-07 16:32 被阅读0次
    错误信息

    [NSArray initWithArray:range:copyItems:]: array argument is not an NSArray’

    原因分析

    参数传入错误

    错误代码:
    self.titleArray = [NSMutableArray arrayWithArray:[[GoodsInfoManager shareGoodsInfoManager].formata objectForKey:@"attr"]];
    原因分析:因为这里的attr是一个key-value类型,根本不是数组类型

    正确代码
    self.titleArray = [NSMutableArray arrayWithArray:[[[GoodsInfoManager shareGoodsInfoManager].formata objectForKey:@"attr"] allKeys]];

    相关文章

      网友评论

          本文标题:Terminating app due to uncaught

          本文链接:https://www.haomeiwen.com/subject/ghbrbctx.html