IOS array out-of-bounds Solution
The so-called array is out of bounds, that is, if your total number of subscripts is now 32, then you execute another method in the next second to wake up from 50 data records, assign values, filter, and so on. At this time, the number of 32 50 data records has not been requested, and the array may be out of bounds. the crash information is probably like this-[_ NSArrayI objectAtIndex:]: index 100 beyond bounds [0 .. 9] 'specific solution we usually choose to make a judgment column for the array, such as return nil;
Although it is possible in most cases, it is not rigorous, if you set an nstray for event loop execution and you have a large amount of data, the number of arrays is always changing columns, such as the pins on the map. You need to perform the NSArray or NSmutableArray yourself. one method extension replaces [_ performancearray objectAtIndex: indexPath. row] This method.
The following is a method from the perspective of a great god. It is very helpful for me to try it!
Replace objectAtIndex with objectAtIndexCheck.
You can give it a try. You will always learn the Logic Thinking of the great God as you keep improving.