Closed rudedogg closed 6 years ago
If there's something I can add (including documentation) - please let me know. I'd love to know more about what you saw.
Thanks @tonyarnold
I think the main issue I ran into was using Protocols as types in my datasource. That makes Equatable hard to implement, I had to use type erasure following https://khawerkhaliq.com/blog/swift-protocols-equatable-part-one/ as a guide. I've since switched to passing a nested Array of AnyEquatable{Protocol}
to the calls of collectionView..animateItemAndSectionChanges(oldData: oldData, newData: newData)
, and the compiler is happy! It seems like using my struct above should work, but I think it's just a limitation of the Swift compiler.
I noticed a bug with the animations on NSCollectionView, so I'll open a PR for that.
I'm having some trouble using Differ with an NSCollectionView, specifically the function
animateItemsAndSectionChanges(oldData: , newData:)
Here's a quick example of the code I'm using:
But the compiler complains
Generic parameter 'T' could not be inferred
.Edit: This doesn't seem to be a bug, I think it was just a compiler/generics/protocols difficulty. I'll post more details tomorrow