---
title: MagnifyGesture
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/magnifygesture
---

# MagnifyGesture

A gesture that recognizes a magnification motion and tracks the amount of magnification.

## Declaration

```swift
nonisolated struct MagnifyGesture
```

## Overview

Overview A magnify gesture tracks how a magnification event sequence changes. To recognize a magnify gesture on a view, create and configure the gesture, and then add it to the view using the gesture(_:including:) modifier. Add a magnify gesture to a Circle that changes its size while the user performs the gesture: struct MagnifyGestureView: View {     @GestureState private var magnifyBy = 1.0

var magnification: some Gesture {         MagnifyGesture()             .updating($magnifyBy) { value, gestureState, transaction in                 gestureState = value.magnification             }     }

var body: some View {         Circle()             .frame(width: 100, height: 100)             .scaleEffect(magnifyBy)             .gesture(magnification)     } }

## Topics

### Creating the gesture

- [init(minimumScaleDelta:)](swiftui/magnifygesture/init(minimumscaledelta:).md)
- [init(minimumScaleDelta:inputKinds:)](swiftui/magnifygesture/init(minimumscaledelta:inputkinds:).md)
- [minimumScaleDelta](swiftui/magnifygesture/minimumscaledelta.md)

## Relationships

### Conforms To

- [Gesture](swiftui/gesture.md)

## See Also

### Recognizing gestures that change over time

- [gesture(_:)](swiftui/view/gesture(_:).md)
- [gesture(_:isEnabled:)](swiftui/view/gesture(_:isenabled:).md)
- [gesture(_:name:isEnabled:)](swiftui/view/gesture(_:name:isenabled:).md)
- [gesture(_:including:)](swiftui/view/gesture(_:including:).md)
- [DragGesture](swiftui/draggesture.md)
- [WindowDragGesture](swiftui/windowdraggesture.md)
- [RotateGesture](swiftui/rotategesture.md)
- [RotateGesture3D](swiftui/rotategesture3d.md)
- [GestureMask](swiftui/gesturemask.md)
