티스토리 뷰

728x90
반응형

UIScrollViewDelegate 중 스크롤링과 드래깅과 관련된 메서드에 대해서 알아보자.(이 외에도 zoom 관련 메서드도 있음)

Responding to Scrolling and Dragging

Tells the delegate when the user scrolls the content view within the receiver.

delegate 는 일반적으로 스크롤뷰에서 content offset 의 변경사항을 가져온다.

Tells the delegate when the scroll view is about to start scrolling the content.

delegate 는 짧은 거리에서 드래그가 발생할 때까지 이 메시지를 받지 못할 수 있다.

Tells the delegate when the user finishes scrolling the content.

targetContentOffset 매개변수 값을 변경해서 스크롤뷰가 스크롤 애니메이션을 완료하는 위치를 조정할 수 있다.

Tells the delegate when dragging ended in the scroll view.

스크롤뷰는 사용자의 손가락이 드래그 한 후 touches up 했을 때 이 메시지를 보낸다.

Asks the delegate if the scroll view should scroll to the top of the content.

delegate 가 이 메서드를 구현하지 않으면 true 로 간주된다. status bar 를 탭하는 scroll-to-top 제스쳐를 위해서는 scrollsToTop 속성이 YES 로 설정되어야 한다.(default true.)

Tells the delegate that the scroll view scrolled to the top of the content.

scroll view 는 content 의 top 으로 스크롤링이 끝난 후 이 메시지를 보낸다. 만약 content 의 top 이 이미 보여져 있다면 즉시 호출할 수 있다.

status bar 를 탭하는 scroll-to-top 제스쳐를 위해서는 scrollsToTop 속성이 YES 로 설정되어야 한다.(default true.)

Tells the delegate that the scroll view is starting to decelerate the scrolling movement.

스크롤뷰는 사용자의 손가락이 스크롤 작업 중에 touches up 할 때 이 메서드를 호출한다.

Tells the delegate that the scroll view has ended decelerating the scrolling movement.

스크롤뷰는 스크롤 움직임이 halt(멈출 때. stop 보다 강함) 호출 한다.

Responding to Scrolling Animations

Tells the delegate when a scrolling animation in the scroll view concludes.(끝날 때)

스크롤 뷰는 setContentOffset(:animated:) scrollRectToVisible(:animated:) 메서드 구현이 끝날 때 이 메서드를 호출하지만 애니메이션이 요청된 경우에만 호출합니다.

728x90
반응형
댓글
최근에 올라온 글
최근에 달린 댓글
글 보관함
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
링크
Total
Today
Yesterday