airbnb / airbnb/MagazineLayout
Reloading collectionview does not maintain content offset
- Dominant language
- Swift
- Stars
- 3.4k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When `reloadData()` is called, the `collectionView` sometimes doesn't preserve the scrolling position, causing the collectionView to jump abruptly
**To Reproduce**
Steps to reproduce the behavior:
1. Open and run the stock example project (workspacce) under `MagazineLayoutExample`
2. Please see the attached gif to reproduce this issue
Note: this doesn't occur every time, you need to adjust scrolling position before reloading the data if you cannot reproduce it at the beginning
**Expected behavior**
The screen should maintain its position after reloading data
**Screenshots**

**Smartphone (please complete the following information):**
- Simulator: iPhone 11 Pro Max
- OS: iOS 13.0
- Version: current
**Additional context**
Not sure if this could be a bug in UICollectionView rather than MagazineLayout, please advise.
Contributor guide
Assessment
This issue has not been assessed yet.