Skip to content

Conversation

@atdrendel
Copy link

This pull request improves selection in ASCollectionView in a number of ways.

  1. Remove the limitation on selection only being allowed while editing. Now, selection or multiple selection can be triggered enabled/disabled through the use of the allowsSelection(_:) and allowsMultipleSelection(_:) modifiers on ASCollectionView.
  2. Rename ASSection.selectedItems to selectedIndexes to clarify the property holds indexes, not the model objects themselves.
  3. Make ASCollectionView respond to changes to selectedIndexes from the SwiftUI side. In other words, the Binding<Set<Int>>? has become a true, two-way binding, which is what Apple says Bindings should be.

The demo app's screens have been updated to reflect these changes.

@atdrendel atdrendel merged commit 52d92f5 into master Sep 2, 2020
@atdrendel atdrendel deleted the selection branch September 2, 2020 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants