Re: Correcting scrollbar after app state restoration


Steve Mills
 

On May 14, 2020, at 01:56:27, Allan Odgaard <groups-io@simplit.com> wrote:

You can send reflectScrolledClipView: to the NSScrollView instance after state restoration.

But it should basically never be necessary to call this method manually, so even if it fixes it, something may still be wrong / broken.

https://developer.apple.com/documentation/appkit/nsscrollview/1403534-reflectscrolledclipview
Thanks for pointing out that method. I tried it, but it didn't work. Not sure when the scrollbar is being restored to a stupid value. But, I've added predicate restoration, and that solves it. I also added a small icon that indicates when the collection view is showing some or all items, which lets the user see at a glance after re-open that they might not be seeing everything.

--
Steve Mills
Drummer, Mac geek

Join cocoa@apple-dev.groups.io to automatically receive all group messages.