태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

mobile/ios2011/10/19 17:01

예전에, 팀원 분이 물어봤었는데, 찾아보지도 않고, 경험상 잘 모르겠다고만 답변하고 넘어갔었던 문제를

오늘 내가 부딪치게 되었다 ㅠ_ㅠ

근데 간단히 해결했다 ㅋㅋㅋ 옆에 계신 차장님의 도움으로 ㅎㅎ

원인은, 하나의 뷰에 여러개의 스크롤 뷰를 사용했을 경우에, 한곳에서만 이벤트를 받기때문인데,  

속성으로 간단히 제어가 가능하다.

API를 찾아보면,

http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIScrollView_Class/Reference/UIScrollView.html

scrollsToTop

A Boolean value that controls whether the scroll-to-top gesture is effective

@property(nonatomic) BOOL scrollsToTop
Discussion

The scroll-to-top gesture is a tap on the status bar; when this property is YES, the scroll view jumps to the top of the content when this gesture occurs. The default value of this property is YES.

This gesture works on a single visible scroll view; if there are multiple scroll views (for example, a date picker) with this property set, or if the delegate returns NO in scrollViewShouldScrollToTop:UIScrollView ignores the request. After the scroll view scrolls to the top of the content view, it sends the delegate a scrollViewDidScrollToTop: message.

Availability
  • Available in iOS 2.0 and later.
Declared In
UIScrollView.h 

 이를 이용하면 되는것이다. ㅎㅎ

간단히 해결! -_-! 
Posted by THLIFE.net

TRACKBACK http://thlife.net/trackback/1077 관련글 쓰기

댓글을 달아 주세요