<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIScrollView/touchesShouldCancel(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIScrollView(im)touchesShouldCancelInContentView:"
  },
  "title" : "touchesShouldCancel(in:)"
}
-->

# touchesShouldCancel(in:)

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

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

## Parameters

`view`

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

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> to cancel further touch messages to `view`, <doc://com.apple.documentation/documentation/Swift/false> to have `view` continue to receive those messages. The default returned value is <doc://com.apple.documentation/documentation/Swift/true> if `view` is not a [`UIControl`](/documentation/UIKit/UIControl) object; otherwise, it returns <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

The scroll view calls this method just after it starts sending tracking messages to the content view. If it receives <doc://com.apple.documentation/documentation/Swift/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`](/documentation/UIKit/UIScrollView/canCancelContentTouches) property is <doc://com.apple.documentation/documentation/Swift/false>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)