美文网首页
错误集合

错误集合

作者: Andyzhao | 来源:发表于2016-04-25 11:43 被阅读573次
  • 1
Invalid update: invalid number of rows in section 1.  The number of rows contained in an existing section after the update (3) must be equal to the number of rows contained in that section before the update (3), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).

我的代码错误原因

// roloadData中描述
You should not call this method in the middle of animation blocks where items are being inserted or deleted. Insertions and deletions automatically cause the table’s data to be updated appropriately.
   // 代码中的逻辑有可能出现下面这种情况
    NSMutableArray *indexPathList = [NSMutableArray array];
    [indexPathList addObject:[NSIndexPath indexPathForRow:2 inSection:1]];
    [self.tableView reloadData];// roloadData在插入、删除或者刷新组时调用回报错,导致和numberOfSectionsInTableView:返回不一致,造成闪退
    [self.tableView insertRowsAtIndexPaths:indexPathList withRowAnimation:UITableViewRowAnimationAutomatic];

相关文章

  • 错误集合

    Commit failed with error: did not match any file(s) known...

  • 错误集合

    1.dyld: Library not loaded: @rpath/libswiftCore.dylib R...

  • 错误集合

    1 我的代码错误原因

  • 错误集合

    CocoaPods报错:The dependency AFNetworking is not used in an...

  • 错误集合

    错误一:英文描述 中文描述:大体意思就是这个App缺少一个获取私有(敏感)数据的权限描述,需要我们在info.pl...

  • 错误集合

    1、composer 报 Failed to decode response: zlib_decode(): da...

  • 错误集合

    spring boot 解决后台返回 json 到前台出现中文乱码的问题 微信 登录 Scope 参数错误或没有 ...

  • 错误集合

    MAC,IDEA运行 Test 发生错误 解决办法:1、删除缓存 rm -rf ~/Library/Caches/...

  • 友盟错误

    一 友盟分享错误集合 1 报.o的错误 解决方案 二 友盟分析错误集合 1 更新pods出现冲突错误 解决方案 先...

  • oracle错误集合

    ORA-00001: 违反唯一约束条件 (.) 错误说明:当在唯一索引所对应的列上键入重复值时,会触发此异常。 O...

网友评论

      本文标题:错误集合

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