<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macCatalyst: 17.4.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIScrollView/withScrollIndicatorsShown(forContentOffsetChanges:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIScrollView(im)withScrollIndicatorsShownForContentOffsetChanges:"
  },
  "title" : "withScrollIndicatorsShown(forContentOffsetChanges:)"
}
-->

# withScrollIndicatorsShown(forContentOffsetChanges:)

Displays the scroll indicators during updates to the scroll view’s content offset.

```
func withScrollIndicatorsShown(forContentOffsetChanges changes: () -> Void)
```

## Parameters

`changes`

A block that changes the scroll view’s content offset.

## Discussion

The scroll view displays the scroll indicator for an axis if the content offset changes along that axis; otherwise, the scroll indicator for that axis remains hidden. For example, if you update the content offset horizontally in the `changes` block, the scroll view shows the horizontal scroll indicator but not the vertical scroll indicator.

If you animate changes to the content offset in the `changes` block, the scroll view displays its scroll indicators in their original locations, animates them to the destination locations, then fades them out. Otherwise, the scroll view displays its scroll indicators in the destination locations, then fades them out.

---

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)