开发者

Programmatically scrolling NSTextView without scrollbar

开发者 https://www.devze.com 2023-03-15 02:28 出处:网络
I\'m trying to scroll a textview programmatically using the scrollToPoint method. This works fine if the textview has a scrollbar, but if I disable it with setHasVerticalScroller:NO, I get some strang

I'm trying to scroll a textview programmatically using the scrollToPoint method. This works fine if the textview has a scrollbar, but if I disable it with setHasVerticalScroller:NO, I get some strange results: if I try to scroll using the two-finger gesture after the programmatic scroll, the textview automatically jumps back to the point that was shown before the programmatic 开发者_运维问答scroll. I already tried redrawing the textview and actualizing it, but nothing worked.

0

精彩评论

暂无评论...
验证码 换一张
取 消