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

# setZoomScale(_:animated:)

A floating-point value that specifies the current zoom scale.

```
func setZoomScale(_ scale: CGFloat, animated: Bool)
```

## Parameters

`scale`

The new value to scale the content to.

`animated`

<doc://com.apple.documentation/documentation/Swift/true> to animate the transition to the new scale, <doc://com.apple.documentation/documentation/Swift/false> to make the transition immediate.

## Discussion

The new scale value should be between the [`minimumZoomScale`](/documentation/UIKit/UIScrollView/minimumZoomScale) and the [`maximumZoomScale`](/documentation/UIKit/UIScrollView/maximumZoomScale).

---

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)