Closed ryangittings closed 4 years ago
Ah this would be related to the fix for #68. To fix the request for a phantom section I returned an empty NSCollectionLayoutSection. It seems this placeholder also needs a sub item configured. I’ll try look at this tomorrow, but I would expect the error to go away if you add a subitem to that placeholder on line 112
Legend, I'll await a fix tomorrow! Really appreciate it.
Should be fixed on the dev
branch now. I still can't actually reproduce a case where that guard statement is actually triggered though.
It seems to occur for me when you’re on a view and you push to the same view with different data from that view.
This might be due to some unexpected SwiftUI behaviour where it's reusing the UIViewController underlying ASCollectionView instead of making a new one. Try wrapping the different uses of that view with an .id("SOMEUNIQUESTRING")
with a different string and see if that makes a difference. A similar issue is happening with TabView (#44).
If this is the case: the fix that's currently in place will avoid the crash but might have unexpected visual side-effects (are any sections appearing as a list and shouldn't be?)
Getting the following error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'At least 1 subitem is required for a group'
This is on
ASCollectionViewLayout.swift
, line112
. Once again, if I can help at all let me know! :)