diff --git a/CHANGELOG.md b/CHANGELOG.md index f95614b4..10206ede 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ This release closes the [2.2.0 milestone](https://github.com/Instagram/IGListKit - Fix bug where emptyView's hidden status is not updated after the number of items is changed with `insertInSectionController:atIndexes:` or related methods. [Peter Edmonston](https://github.com/edmonston) [(#395)](https://github.com/Instagram/IGListKit/pull/395) - Fix bug where `IGListStackedSectionController`'s children need to know `numberOrItems` before didUpdate is called. [(#348)](https://github.com/Instagram/IGListKit/pull/390) +- Fix bug where `-[UICollectionViewCell ig_setStackedSectionControllerIndex:]` should use `OBJC_ASSOCIATION_COPY_NONATOMIC` for NSNumber. [PhilCai](https://github.com/PhilCai1993) [(#424)](https://github.com/Instagram/IGListKit/pull/426) 2.1.0 ----- @@ -178,3 +179,5 @@ You can find a [migration guide here](https://instagram.github.io/IGListKit/migr ----- Initial release. :tada: + + diff --git a/Source/IGListStackedSectionController.m b/Source/IGListStackedSectionController.m index 0d590b43..1496998f 100644 --- a/Source/IGListStackedSectionController.m +++ b/Source/IGListStackedSectionController.m @@ -33,7 +33,7 @@ static void * kStackedSectionControllerKey = &kStackedSectionControllerKey; static void * kStackedSectionControllerIndexKey = &kStackedSectionControllerIndexKey; - (void)ig_setStackedSectionControllerIndex:(NSInteger)stackedSectionControllerIndex { - objc_setAssociatedObject(self, kStackedSectionControllerIndexKey, @(stackedSectionControllerIndex), OBJC_ASSOCIATION_ASSIGN); + objc_setAssociatedObject(self, kStackedSectionControllerIndexKey, @(stackedSectionControllerIndex), OBJC_ASSOCIATION_COPY_NONATOMIC); } - (NSInteger)ig_stackedSectionControllerIndex {