---
title: "redoActionUserInfoValue(forKey:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/undomanager/redoactionuserinfovalue(forkey:)"
---

# redoActionUserInfoValue(forKey:)

Retrieves the redo action’s user info value for the given key.

## Declaration

```swift
func redoActionUserInfoValue(forKey key: UndoManager.UserInfoKey) -> Any?
```

## Parameters

- `key`: The key associated with the value to return.

## Return Value

Return Value The value that you previously registered to this key with setActionUserInfoValue(_:forKey:), or nil if the key is absent.

## Discussion

Discussion Use this method to retrieve a user info value for the redo action you previously set with setActionUserInfoValue(_:forKey:). In this example, an app’s redoButton() method provides a SwiftUI view that incorporates a previously assigned icon for the action: func redoButton() -> some SwiftUI.View {     Button(action: {         self.undoManager.redo()     }) {         Label(self.undoManager.redoActionName,               image: self.undoManager.redoActionUserInfoValue(forKey: .icon) as? Image)     } }

## See Also

### Working with user info

- [setActionUserInfoValue(_:forKey:)](foundation/undomanager/setactionuserinfovalue(_:forkey:).md)
- [undoActionUserInfoValue(forKey:)](foundation/undomanager/undoactionuserinfovalue(forkey:).md)
- [UndoManager.UserInfoKey](foundation/undomanager/userinfokey.md)
