Instagram / IGListKit

A data-driven UICollectionView framework for building fast and flexible lists.
https://instagram.github.io/IGListKit/
MIT License
12.89k stars 1.54k forks source link

Achieve UICollectionView's behaviour of allowsMultipleSelection = false #1185

Open sasquatchgit opened 6 years ago

sasquatchgit commented 6 years ago

New issue checklist

I am using EmbeddedSection Controller for showing horizontal scrolling list. I want to have just one selected cell in the horizontal list. (and deselect others when one is selected) I can see there are two approaches:

  1. Iterate over SCs and see which are selected
  2. Create delegate that forwards selections/deselections.

However, in a discussion of #184, @rnystrom has mentioned that they are trying to bake support into IGListKit. What is the best way to do it now? Is there an example?

rnystrom commented 6 years ago

Right now we don’t have great first-class support for multi selection. You should be able to use this API as-is already. Have you tried that yet?

FWIW we use the delegation pattern at Instagram which gives us much more control over.

Sent with GitHawk