Layout Error

I got this error message and my App is killed.

Fatal Exception: NSRangeException *** -[__NSArrayM objectAtIndex:]: index 3 beyond bounds [0 .. 2]

I developed using UITableViewCell API. When calling UITableViewCell API, CollectionViewLeftAlignFlowLayout is reproduced every time.

Has anyone experienced this? What was the cause?

Replies

Please show code where the error occurs. And in particular all the CollectionView delegate functions.

You have 3 items in collection and try to access to the fourth one (index 3).