Sunday, October 11, 2009

iPhone dev Stupidity 31: tracking touch in scrollview



[self setCanCancelContentTouches:NO]

canCancelContentTouches

A Boolean value that controls whether touches in the content view always lead to tracking.

@property(nonatomic) BOOL canCancelContentTouches

Discussion

If the value of this property is YES and a view in the content has begun tracking a finger touching it, and if the user drags the finger enough to initiate a scroll, the view receives a touchesCancelled:withEvent: message and the scroll view handles the touch as a scroll. If the value of this property is NO, the scroll view does not scroll regardless of finger movement once the content view starts tracking.


* A life-saving property - reading again from Apple Sample Code: UIScrollViewSuite - AutoScroll.

No comments: