BroadcastingCollections is a library of classes and protocols that gives developers the ability to easily and efficiently keep track of changes being made to a collection, receiving callbacks about what precisely those changes are at the appropriate times and allowing for easy creation of automatically updated filtered and sorted versions of those collections.
BroadcastingCollections is currently being built on Xcode 11.3, using Apple's latest SDK and Swift 5.1.
It's been used and tested on macOS 10.13 to 10.14 and iOS 11 - iOS 13, but should work without changes on the latest versions of TvOS and WatchOS.
It should also work with minimal changes on any older Apple OS which supports Swift deployment.
Just clone the repo whenever it works best for your project setup, either as a submodule or as a sibling repository.
BroadcastingCollections only depends on Foundation and the Swift standard library so you can easily add the framework straight to your project. You'll need to perform the following steps:
The included demo app target builds a standard setup for a master-detail UI, including support for multiple selection. Reading through it should be enough to clear out how to use it in similar setups.
For existing codebases, an easy thing to do is to replace a model array with an EditableBroadcastingOrderedSet and set a table controller as its listener.
The BroadcastingCollections library is already useful and useable in its current shape, but it's a first public version and is still in active development. Anything you believe should be improved deserves filing an issue, including but not limited to:
Anyone who may want to contribute patches, keep in mind the following:
Copyright 2018 Óscar Morales Vivó
Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php