Closed jeffbailey closed 7 years ago
README
IGListKit
The current implementation is this:
- (void)deselectItemAtIndex:(NSInteger)index sectionController:(IGListSectionController<IGListSectionType> *)sectionController animated:(BOOL)animated { const NSUInteger localIndex = [self localIndexForSectionController:sectionController index:index]; [self.collectionContext deselectItemAtIndex:localIndex sectionController:self animated:animated]; }
But I believe the correct implementation is:
- (void)deselectItemAtIndex:(NSInteger)index sectionController:(IGListSectionController<IGListSectionType> *)sectionController animated:(BOOL)animated { const NSUInteger relativeIndex = [self relativeIndexForSectionController:sectionController fromLocalIndex:index]; [self.collectionContext deselectItemAtIndex:relativeIndex sectionController:self animated:animated]; }
The index being passed to this method is already a local index, so it needs to be converted to an index relative to the Stacked Section Controller.
Yikes, yup! Spot on. Definitely a bug w/ stacked section controller.
Great. IGListKit is brilliant BTW. Thanks for making it open source.
@jeffbailey that means the world to me
New issue checklist
README
and documentationGeneral information
IGListKit
version: Current masterThe current implementation is this:
But I believe the correct implementation is:
The index being passed to this method is already a local index, so it needs to be converted to an index relative to the Stacked Section Controller.