<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIScrollViewDelegate/scrollViewWillEndDragging(_:withVelocity:targetContentOffset:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIScrollViewDelegate(im)scrollViewWillEndDragging:withVelocity:targetContentOffset:"
  },
  "title" : "scrollViewWillEndDragging(_:withVelocity:targetContentOffset:)"
}
-->

# scrollViewWillEndDragging(_:withVelocity:targetContentOffset:)

Tells the delegate when the user finishes scrolling the content.

```
optional func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>)
```

## Parameters

`scrollView`

The scroll-view object where the user ended the touch.

`velocity`

The velocity of the scroll view (in points per millisecond) at the moment the touch was released.

`targetContentOffset`

The expected offset when the scrolling action decelerates to a stop.

## Discussion

Your application can change the value of the `targetContentOffset` parameter to adjust where the scrollview finishes its scrolling animation.

---

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)