When you scroll the new Apple Magic Mouse (at least 10.6, I cannot confirm the previous Mac OS), you get inertial scrolling, for example, scrolling on the iPhone (i.e. after scrolling your finger to scroll). does not stop abruptly, but gradually slows down). This behavior is “free” with all NSScrollViews, it will appear.
There are exceptional cases, such as Tweetie for Mac (I heard that Tweetie was written using the special Table View class, which is similar to how it UITableViewworks on the iPhone).
My question is, how does the scroll view know how to do this inertial scroll? I assume that the mouse [driver] repeatedly sends scroll events with decreasing scroll force (or something like that) during the scroll period. But I'm not sure how this works.
I am having scrolling problems in my scrollview class, and I'm trying to figure out why (obviously, we don't have the source code for Tweetie to understand why it doesn't get the correct scroll), but just trying to better understand how it works to fix my own problems.
source
share