Analysis of Apple’s rubber band scrolling
January 6, 2013
I recently saw a post on Twitter from @chpwn that described the alogorithm that Apple uses for its “rubber band” or “bungee” scrolling.
b = (1.0 – (1.0 / ((x * c / d) + 1.0))) * d
|In iOS 11, interactive view controller transitions no longer scrub by setting the layer speed to zero|
|and changing the timeOffset. As a result of this change, implicit animations that occur in places like|
|-viewWillAppear: (called during an interactive transition) no longer end up “caught in” the animation.|
|To get the same behavior for table view row deselection as before, you can either use UITableViewController|
|which implements this for you, or you can implement it manually by deselecting the row in an alongside|
|animation for the transition (set up in -viewWillAppear: using the transition coordinator).|
|Here is an example implementation which correctly handles some of the more subtle corner cases:|
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use
!important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?