Question

I am developing a Cocoa Application for Mac OSX. I intend to have multiple NSScrollViews and I'd like all of them to scroll at the same time if one of them is selected and scrolled.

I saw for UIScrollView there is a method "scrollViewDidScroll" that I could do this with an iPhone application.

Is there anything similar for NSScrollView or a way to go about doing this? Any help would be greatly appreciated.

Was it helpful?

Solution

Your solution is going to require that one of the scroll views will need to receive notifications that the other scroll view is being scrolled.

Apple actually provides some very nice documentation on Synchronizing Scroll Views, which also has some sample code snippets as part of it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top