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

# scrollsToTop

A Boolean value that controls whether the scroll-to-top gesture is enabled.

```
var scrollsToTop: Bool { get set }
```

## Discussion

The scroll-to-top gesture is a tap on the status bar. When a user makes this gesture, the system asks the scroll view closest to the status bar to scroll to the top. If that scroll view has [`scrollsToTop`](/documentation/UIKit/UIScrollView/scrollsToTop) set to <doc://com.apple.documentation/documentation/Swift/false>, its delegate returns <doc://com.apple.documentation/documentation/Swift/false> from [`scrollViewShouldScrollToTop(_:)`](/documentation/UIKit/UIScrollViewDelegate/scrollViewShouldScrollToTop(_:)), or the content is already at the top, nothing happens.

After the scroll view scrolls to the top of the content view, it sends the delegate a [`scrollViewDidScrollToTop(_:)`](/documentation/UIKit/UIScrollViewDelegate/scrollViewDidScrollToTop(_:)) message.

The default value of this property is <doc://com.apple.documentation/documentation/Swift/true>.

### Special considerations

On iPhone, the scroll-to-top gesture has no effect if there’s more than one scroll view onscreen that has [`scrollsToTop`](/documentation/UIKit/UIScrollView/scrollsToTop) 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)