<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/scaleEffect(_:anchor:)-7q7as",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE11scaleEffect_6anchorQrSo6CGSizeV_AA9UnitPointVtF"
  },
  "title" : "scaleEffect(_:anchor:)"
}
-->

# scaleEffect(_:anchor:)

Scales this view’s rendered output by the given vertical and horizontal
size amounts, relative to an anchor point.

```
nonisolated func scaleEffect(_ scale: CGSize, anchor: UnitPoint = .center) -> some View
```

## Parameters

`scale`

A <doc://com.apple.documentation/documentation/CoreFoundation/CGSize> that
represents the horizontal and vertical amount to scale the view.

`anchor`

The point with a default of `UnitPoint/center` that
defines the location within the view from which to apply the
transformation.

## Discussion

Use `scaleEffect(_:anchor:)` to scale a view by applying a scaling
transform of a specific size, specified by `scale`.

```
Image(systemName: "envelope.badge.fill")
    .resizable()
    .frame(width: 100, height: 100, alignment: .center)
    .foregroundColor(Color.red)
    .scaleEffect(CGSize(x: 0.9, y: 1.3), anchor: .leading)
    .border(Color.gray)
```

![A screenshot showing a red envelope scaled to a size of 90x130](images/com.apple.SwiftUI/SwiftUI-View-scaleEffect@2x.png)

---

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)