2012-12-16 5 views
5

NSScrollView가 현재 스크롤 중인지 어떻게 알 수 있습니까? iOS에서 위임을 사용할 수 있지만 인터넷 검색 기능이 많더라도 Mac에서이 작업을 수행 할 수있는 방법을 찾을 수 없습니다.NSScrollView가 현재 스크롤 중인지 확인하는 방법

미리 감사드립니다. NSScrollViewWillStartLiveScrollNotification도 있습니다 OS X 10.9 같이

NSView *contentView = [scrollview contentView]; 

[contentView setPostsBoundsChangedNotifications:YES]; 

// a register for those notifications on the content view. 
[[NSNotificationCenter defaultCenter] addObserver:self 
             selector:@selector(boundDidChange:) 
              name:NSViewBoundsDidChangeNotification 
              object:contentView]; 

아래 통지 방법

- (void)boundDidChange:(NSNotification *)notification { 
    // get the changed content view from the notification 
    NSClipView *changedContentView=[notification object]; 
} 

답변

13

넌 NSViewBoundsDidChangeNotification 통지를 수신 할 수있다. 이것은 사용자 스크롤 이벤트가 시작될 때 메인 스레드에 게시됩니다.

2

를 도시처럼

관련 문제