问题
Does anybody know why when scrolling (via two finger touch) rapidly up and down it "catches" quite often and bounces incorrectly in the middle of a scrollview? This behavior is quite annoying and makes for a bad user experience.
Xcode has scrollviews which bounce both horizontally and vertically and doesn't nearly-as-often get stuck this way.
回答1:
That seems like a bug in NSScrollView.
You can enable predominant axis scrolling, which mostly eliminates the problem:
scrollView.usesPredominantAxisScrolling = YES;
Or, you can disable horizontal bouncing, which is what Finder does:
scrollView.horizontalScrollElasticity = NSScrollElasticityNone;
来源:https://stackoverflow.com/questions/21339616/cocoa-scroll-view-keeps-bouncing-on-mavericks-in-the-middle-of-the-file