可可滚动视图在文件中间的特立独行的情况下不断弹跳 [英] Cocoa Scroll view keeps bouncing on mavericks in the middle of the file
问题描述
有人知道为什么在向上滚动和向下滚动时(通过两根手指触摸)它经常捕捉并在滚动视图的中间错误地反弹吗?此行为非常令人讨厌,并导致不良的用户体验。
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的滚动视图可水平和垂直弹动,并且几乎不会像这样卡住。
Xcode has scrollviews which bounce both horizontally and vertically and doesn't nearly-as-often get stuck this way.
推荐答案
这似乎是NSScrollView中的错误。
That seems like a bug in NSScrollView.
您可以启用主要的轴滚动功能,这基本上可以消除问题:
You can enable predominant axis scrolling, which mostly eliminates the problem:
scrollView.usesPredominantAxisScrolling = YES;
或者,您可以禁用水平反射,这是Finder的作用:
Or, you can disable horizontal bouncing, which is what Finder does:
scrollView.horizontalScrollElasticity = NSScrollElasticityNone;
这篇关于可可滚动视图在文件中间的特立独行的情况下不断弹跳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!