0

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UICollectionView received layout attributes for a cell with an index path that does not exist: {length = 2, path = 0 - 1}'

*** First throw call stack: (0x18e3841c0 0x18cdbc55c 0x18e384094 0x18ee0e82c 0x194229d0c 0x1942290e4 0x194228574 0x1941c9738 0x19169240c 0x1916870e8 0x1941de1a8 0x1941da480 0x19450f728 0x19450f86c 0x194514f14 0x19430c89c 0x19430c5c4 0x19430c1d0 0x1942b0f50 0x1944fc65c 0x194514858 0x1942b0d04 0x1941c9738 0x19169240c 0x1916870e8 0x191686fa8 0x191603c64 0x19162b0d0 0x19162baf0 0x18e3317dc 0x18e32f40c 0x18e32f89c 0x18e25e048 0x18fce1198 0x194237818 0x194232550 0x1001eae74 0x18d2405b8) libc++abi.dylib: terminating with uncaught exception of type NSException

I have used collection view in table view cells and its get toggle on click of UIButton which is on table view cell.

I have already seen below links but its not working. iOS 10 bug: UICollectionView received layout attributes for a cell with an index path that does not exist

devang bhatt
  • 460
  • 2
  • 15
  • 1
    Possible duplicate of [iOS 10 bug: UICollectionView received layout attributes for a cell with an index path that does not exist](https://stackoverflow.com/questions/39867325/ios-10-bug-uicollectionview-received-layout-attributes-for-a-cell-with-an-index) – Harshal Valanda Jan 09 '18 at 09:13
  • `UICollectionView received layout attributes for a cell with an index path that does not exist` What more do you need? The stack trace has all the info you need – Lefteris Jan 09 '18 at 09:13
  • I need solution for it. I am trying from 2 days but it is not getting solved. – devang bhatt Jan 09 '18 at 09:18
  • As the error tells you your UICollectionViewLayout for the UICollectionView has supplied you UICollectionViewLayoutAttributes for an IndexPath that does not exist in your data. Without you posting any more code there is nothing more we can tell you about the problem. Post much more details code of how you have everything setup or perhaps share the entire project if you can. – Upholder Of Truth Jan 09 '18 at 11:41

0 Answers0