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