Skip to content

Reloading collectionview does not maintain content offset #56

Description

@ChengmingLu

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

Untitled

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions