Introduced in #9. #12 adds GitHub actions to ensure this doesn't occur again.
Previously there was no way to get the index of a child or even know if a
SectionProvider is a child of a
On top of these functions new
insert(_:before:) have been added for convenience.
completion block is called when the animation has completed, but at the end of the
updates block the data has already been updated (from the perspective of the
reset() and setting
defersUpdate = false could cause crashes e.g. due to changes being applied multiple times.
The best way to recreate this is to have a series of updates occur very close to each other but with the "Slow Animation" setting enabled in the simulator.
This change might also apply to table views, I have not checked.
The crash would often be along the lines of "Tried to delete section at index 11 but there were only 11 sections" or would occur in
elementsProvider(for:) with the error
"No UI configuration available for section 11" when performing a non-data change e.g. a reload of a section
Sometimes it's useful to have multiple different cell types within a single section, for example to use sticky headers or to reduce to need for many layers of composition (which can be tricky to get animation right for).
This isn't a breaking change for consumers.
I think some of the naming should be improved if this were to be merged.
Draft because I want feedback on the impact of the feature itself rather than specifically the code.
The package(s) being submitted are:
I have either:
- [x] Run
Or, checked that:
- [ ] The package repositories are publicly accessible.
- [ ] The packages all contain a
Package.swiftfile in the root folder.
- [ ] The packages are written in Swift 4.0 or later.
- [ ] The packages all contain at least one product (either library or executable).
- [ ] The packages all have at least one release tagged as a semantic version.
- [ ] The packages all output valid JSON from
swift package dump-packagewith the latest Swift toolchain.
- [ ] The package URLs are all fully specified including
- [ ] The packages all compile without errors.
While working on the 2.0 update for Gathered I have been trying to develop the app multiple platforms simultaneously. SwiftUI will solve this problem in the future, but I wish to support some OS versions that SwiftUI does not support.
As part of this I have been creating UI tests to test performance, but ran in to an issue when running the UI tests on macOS using Mac Catalyst:
Running tests... The bundle “PerformanceXCTests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle. (dlopen_preflight(...): no suitable image found. Did find: ...: code signature in (...) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?))
Improve API for Subscription/Cancellable