2022-12-07-ios-16-slider
2022-12-07-ios-16-slider copied to clipboard
Playing with inertia when calculating percentage change
Adapted the percentage change calculation to add in the concept of inertia.
- I did this with the help of ChatGPT, which got me 90% of the way there.
- The inertia value can be changed by multiplying the difference in percentage change.
- I've found that
6
has a nice feel to it, at least on desktop with a mouse. Further testing is required for mobile. - This is to emulate something I've seen on iOS sliders before (although can't find a worthwhile example at this moment), which change their position depending on the movement speed of the users finger.
- The faster the finger movement, the greater the movement to the slider.
- This can help users make an update without having to swipe across the whole screen.
Chat GPT conversation