---
title: "touchesShouldCancel(in:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiscrollview/touchesshouldcancel(in:)"
---

# touchesShouldCancel(in:)

Returns whether to cancel touches related to the content subview and start dragging.

## Declaration

```swift
func touchesShouldCancel(in view: UIView) -> Bool
```

## Parameters

- `view`: The view object in the content that’s being touched.

## Return Value

Return Value true to cancel further touch messages to view, false to have view continue to receive those messages. The default returned value is true if view is not a UIControl object; otherwise, it returns false.

## Discussion

Discussion The scroll view calls this method just after it starts sending tracking messages to the content view. If it receives false from this method, it stops dragging and forwards the touch events to the content subview. The scroll view doesn’t call this method if the value of the canCancelContentTouches property is false.

## See Also

### Managing touches

- [touchesShouldBegin(_:with:in:)](uikit/uiscrollview/touchesshouldbegin(_:with:in:).md)
- [canCancelContentTouches](uikit/uiscrollview/cancancelcontenttouches.md)
- [delaysContentTouches](uikit/uiscrollview/delayscontenttouches.md)
- [directionalPressGestureRecognizer](uikit/uiscrollview/directionalpressgesturerecognizer.md)
