---
title: "scaleEffect(_:anchor:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/scaleeffect(_:anchor:)"
---

# scaleEffect(_:anchor:)

Scales this view’s rendered output by the given amount in both the horizontal and vertical directions, relative to an anchor point.

## Declaration

```swift
nonisolated func scaleEffect(_ s: CGFloat, anchor: UnitPoint = .center) -> ModifiedContent<Self, _UniformScaleEffect>
```

## Parameters

- `s`: The amount to scale the view in the view in both the horizontal and vertical directions.
- `anchor`: The anchor point with a default of doc://com.apple.SwiftUI/documentation/SwiftUI/UnitPoint/center that indicates the starting position for the scale operation.

## Discussion

Discussion Use scaleEffect(_:anchor:) to apply a horizontally and vertically scaling transform to a view. Image(systemName: "envelope.badge.fill")     .resizable()     .frame(width: 100, height: 100, alignment: .center)     .foregroundColor(Color.red)     .scaleEffect(2, anchor: .leading)     .border(Color.gray)

## See Also

### Scaling, rotating, or transforming a view

- [scaledToFill()](swiftui/view/scaledtofill().md)
- [scaledToFit()](swiftui/view/scaledtofit().md)
- [scaleEffect(x:y:anchor:)](swiftui/view/scaleeffect(x:y:anchor:).md)
- [scaleEffect(x:y:z:anchor:)](swiftui/view/scaleeffect(x:y:z:anchor:).md)
- [aspectRatio(_:contentMode:)](swiftui/view/aspectratio(_:contentmode:).md)
- [rotationEffect(_:anchor:)](swiftui/view/rotationeffect(_:anchor:).md)
- [rotation3DEffect(_:axis:anchor:anchorZ:perspective:)](swiftui/view/rotation3deffect(_:axis:anchor:anchorz:perspective:).md)
- [perspectiveRotationEffect(_:axis:anchor:anchorZ:perspective:)](swiftui/view/perspectiverotationeffect(_:axis:anchor:anchorz:perspective:).md)
- [rotation3DEffect(_:anchor:)](swiftui/view/rotation3deffect(_:anchor:).md)
- [rotation3DEffect(_:axis:anchor:)](swiftui/view/rotation3deffect(_:axis:anchor:).md)
- [transformEffect(_:)](swiftui/view/transformeffect(_:).md)
- [transform3DEffect(_:)](swiftui/view/transform3deffect(_:).md)
- [projectionEffect(_:)](swiftui/view/projectioneffect(_:).md)
- [ProjectionTransform](swiftui/projectiontransform.md)
- [ContentMode](swiftui/contentmode.md)
