Code Monkey home page Code Monkey logo

bottomsheet's People

Contributors

skagedal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bottomsheet's Issues

Snapping issues when reloading the tableView

Hello Simon!
Nice repo, it's working great and I like it.
I've been using the same approach in one of the projects I've been working on and it turns out that there's one problem I'd like to talk to you about. This solution works very well as the tableView is static. However, if you have to reload the tableView at some point during the scrolling animation, it can lead to unexpected visual bugs. In order to reproduce the issue, the following conditions should be met:

  1. The data in the tableView should change (i.e. set a different number of rows)
  2. reloadData should be called during the scrolling animation

As the result, one of the following can happen:

  1. (rare) tableView stops scrolling and its contentOffset is stuck in between the two snapping points;
  2. (common) tableView abruptly jumps back to its previous position or to zero offset

Here it is visualized:
bug 1 bug 2

The obvious solution that comes to mind is to defer the reloading until the moment the scrolling is finished, e.g. call reloadData at scrollViewDidEndDecelerating or scrollViewDidEndScrollingAnimation, but I've tried this and it still won't work.

I would like to know if you have any ideas on this topic.

Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.