---
title: "accessibilityZoomAction(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/modifiedcontent/accessibilityzoomaction(_:)"
---

# accessibilityZoomAction(_:)

Adds an accessibility zoom action to the view. Actions allow assistive technologies, such as VoiceOver, to interact with the view by invoking the action.

## Declaration

```swift
nonisolated func accessibilityZoomAction(_ handler: @escaping (AccessibilityZoomGestureAction) -> Void) -> ModifiedContent<Content, Modifier>
```

## Discussion

Discussion For example, this is how a zoom action is used to transform the scale of a shape which has a MagnificationGesture. var body: some View {     Circle()         .scaleEffect(magnifyBy)         .gesture(magnification)         .accessibilityLabel("Circle Magnifier")         .accessibilityZoomAction { action in             switch action.direction {             case .zoomIn:                 magnifyBy += 0.5             case .zoomOut:                  magnifyBy -= 0.5             }         } }
