Bearbeiten

Freigeben über


UIScrollView.CanCancelContentTouches Property

Definition

If set to false, then the scroll view will not scroll as a result of finger movement once the tracking has started in the content view.

public virtual bool CanCancelContentTouches { [Foundation.Export("canCancelContentTouches")] get; [Foundation.Export("setCanCancelContentTouches:")] set; }
member this.CanCancelContentTouches : bool with get, set

Property Value

The default value is true.

Attributes

Remarks

Default value is true.

By default, a UIScrollView intercepts touches before they propagate to subviews and, if a scrolling gesture is made, cancels those touches from being passed to the underlying UIView (instead, both the UIScrollView and the UIView subview receive TouchesCancelled(NSSet, UIEvent) events). By setting this property to false, the application developer specifies that touches immediately propagate to the underlying UIView. This can avoid potentially-perceptible delays in activating subviews, but makes it impossible for the UIScrollView to recognize scrolling and panning gestures. In this situation, it is up to the application developer to develop a logical and consistent model for scrolling. This may involve the use of UIGestureRecognizers, overriding TouchesShouldBegin(NSSet, UIEvent, UIView), TouchesShouldCancelInContentView(UIView)

Applies to