---
title: "copy(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiresponderstandardeditactions/copy(_:)"
---

# copy(_:)

Copies the selected content to the pasteboard.

## Declaration

```swift
optional func copy(_ sender: Any?)
```

## Parameters

- `sender`: The object calling this method.

## Mentioned in

Using responders and the responder chain to handle events

## Discussion

Discussion UIKit calls this method when the user selects the Copy command from an editing menu. Your implementation should write the selected content to the pasteboard without removing the selection from your interface.

## See Also

### Handling copy, cut, paste, and delete commands

- [cut(_:)](uikit/uiresponderstandardeditactions/cut(_:).md)
- [paste(_:)](uikit/uiresponderstandardeditactions/paste(_:).md)
- [pasteAndGo(_:)](uikit/uiresponderstandardeditactions/pasteandgo(_:).md)
- [pasteAndMatchStyle(_:)](uikit/uiresponderstandardeditactions/pasteandmatchstyle(_:).md)
- [pasteAndSearch(_:)](uikit/uiresponderstandardeditactions/pasteandsearch(_:).md)
- [delete(_:)](uikit/uiresponderstandardeditactions/delete(_:).md)
