Вопрос

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.

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top