johnny_mess
johnny_mess

Reputation: 55

How to set NSScrollView to not auto-hide scroller?

When you stop to scroll an NSScrollView, it will auto-hide the scroller.
How can I disable that?
I can not find any property that can change this.

Upvotes: 3

Views: 579

Answers (1)

Thomas Zoechling
Thomas Zoechling

Reputation: 34253

The autohidesScrollers property of NSScrollView is not taken into account for scroll views that use elastic scrolling (the default).
To permanantly make the scrollers visible, you could set the scrollerStyle to .legacy and autohidesScrollers to false.

self.collectionView.enclosingScrollView?.scrollerStyle = .legacy
self.collectionView.enclosingScrollView?.autohidesScrollers = false

Upvotes: 3

Related Questions