Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reloadData doesnt always work #6

Open
saqib-saud opened this issue Dec 30, 2013 · 2 comments
Open

reloadData doesnt always work #6

saqib-saud opened this issue Dec 30, 2013 · 2 comments

Comments

@saqib-saud
Copy link

reloadData doesnt show new data. My example works fine with flowlayout but not with this library.

@aurelienp
Copy link

I agree, this library doesn't work when you change your datasource. The reason for that is that _animator 's behavior and _visibleIndexPaths are not reseted completely in prepareLayout. For performance purpose, the developer chose to add only new visible cells and remove those that where not visible. You have to implement a reset method that empty both _ animator and _visibleIndexPaths and call this method on yout layout each time you need to call a reloadData on your collection view. I hope I'm clear.

@remstos
Copy link

remstos commented Feb 15, 2014

I just call this method and it works ! thanks !

-(void)resetLayout
{
    [_animator removeAllBehaviors];
    [_visibleIndexPaths removeAllObjects];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants