i have search at this websit :
https://stackoverflow.com/search?page=2&tab=relevance&q=nsarraym%20objectatindex%20index%205%20beyond%20bounds%20for%20empty%20array%27 but the solve no suit me.
i used pull refresh: https://github.com/leah/PullToRefresh at my app,but when i pull height too big,it give me crash :NSArrayM objectAtIndex: index 5 beyond bounds for empty array,if my tableview cell only visit 4 cells,it give me :NSArrayM objectAtIndex: index 4 beyond bounds for empty array,if only 3 cells can visit it give me NSArrayM objectAtIndex: index 3 beyond bounds for empty array. at the same i used other pull refresh lib like:https://github.com/emreberge/EGOTableViewPullRefresh as so on,give me the same error.
Of course it is beyond bounds: your array is empty, you can not extract any object form it.
If the array has
nobjects, you can retrieve up to indexn - 1. An empty array has 0 objects, so you can not even retrieve index 0.