<!--
{
  "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/UIScrollViewDelegate/scrollViewDidScrollToTop(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIScrollViewDelegate(im)scrollViewDidScrollToTop:"
  },
  "title" : "scrollViewDidScrollToTop(_:)"
}
-->

# scrollViewDidScrollToTop(_:)

Tells the delegate that the scroll view scrolled to the top of the content.

```
optional func scrollViewDidScrollToTop(_ scrollView: UIScrollView)
```

## Parameters

`scrollView`

The scroll-view object that perform the scrolling operation.

## Discussion

The scroll view sends this message when it finishes scrolling to the top of the content. It might call it immediately if the top of the content is already shown. For the scroll-to-top gesture (a tap on the status bar) to be effective, the [`scrollsToTop`](/documentation/UIKit/UIScrollView/scrollsToTop) property of the [`UIScrollView`](/documentation/UIKit/UIScrollView) must be set to <doc://com.apple.documentation/documentation/Swift/true>.

---

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)