Hi, I am using a ListStackedSectionController. One of the section controllers has multiple items. These can be selected, but there should only be one selected at a time (the others should deselect on new item selection). This works fine, until I set adapter.scrollViewDelegate = self. For some reason, it makes the collection view act as if allowsMultipleSelection is set to true. Even if I explicitly set false to allowsMultipleSelection it still allows multiple selection of items within the section controller. This has got to be a bug?
@yusuftor sounds really bizarre. Could you send us a sample app reproducing the bug? Then I can figure out what鈥檚 going on.
Sent with GitHawk
I think it'll be quicker if I just tell you how to reproduce it using the IGListKitExamples app, it's quite an easy one to reproduce:
In StackedViewController add adapter.scrollViewDelegate = self to viewDidLoad()
Add the scrollViewDelegate extension:
extension StackedViewController : UIScrollViewDelegate {}
DisplaySectionController add this code:override func didSelectItem(at index: Int) {
print("select index", index)
}
override func didDeselectItem(at index: Int) {
print("deselect index", index)
}
Now run the app and go to Stacked Section Controllers and click on some of the items like the ones called "Section 0, Cell 0" etc. You'll see that didSelectItem is always called but didDeselectItem isn't. Now remove the line adapter.scrollViewDelegate = self and try it again. You should see didDeselectItem starts to work! Hope this is an easy fix!
_Technically_ would be quicker to zip your example and drop it into the comment, but I can work with this 馃槃
Sent with GitHawk
No worries, your wish is my command! I have set it up as stated above IGListKit-master-2.zip
Ok I can reproduce the behavior. Should note that it happens with any section controller, not just stacked. You can also repro this by setting the collectionViewDelegate.
This is a real bug! My bug in fact, introduced in #853 馃槄
The proxy checks for didSelect Selectors but not deselect. Will get a PR up with this.
Hello, is there any timeline for 3.3.0?
@ajanuar not too long! Wrapping up a few more PRs and internal projects first.
Hey, is this solved? I am still facing this.
@sasquatchgit yeah it鈥檚 solved, just not on the release version yet I don鈥檛 think. If you point your cocoapods version to the master branch on git it鈥檒l work :)
Sent with GitHawk