报错内容:如下

报错:[__NSArrayI objectAtIndex:]: index 5 beyond bounds [0 .. 4]'

分析:

遇到这种情况,说明超出了数组的范围

如要插入某组数据,但是这组数据只有10条;但是这里设置为20条。当第11个cell填充数据时就会报错,

[__NSArrayI objectAtIndex:]: index 11 beyond bounds [0 .. 9]'

因为没有第11个数据

如下图:

报错:[__NSArrayI objectAtIndex:]: index 5 beyond bounds [0 .. 4]'

解决方法:依据数组内容的条数设置内容显示的条数

报错:[__NSArrayI objectAtIndex:]: index 5 beyond bounds [0 .. 4]'

 

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2021-05-26
  • 2022-01-15
  • 2021-08-31
  • 2022-12-23
  • 2021-08-14
  • 2022-01-05
猜你喜欢
  • 2022-12-23
  • 2021-06-20
  • 2021-09-27
  • 2021-05-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案