---
title: "play(_:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/qcview/play(_:)"
---

# play(_:)

Plays or pauses a composition in a view.

## Declaration

```swift
@IBAction func play(_ sender: Any!)
```

## Parameters

- `sender`: The object (such as a button or menu item) sending the message to play the composition. You need to connect the object in the interface to the action.

## Discussion

Discussion This method starts rendering a composition if it is not already rendering, pauses a composition that is rendering, or resumes rendering for a composition whose rendering is paused. The method is invoked when the user clicks a button or issues a command from some other user interface element, such as a menu.

## See Also

### Using Interface Builder

- [start(_:)](quartz/qcview/start(_:).md)
- [stop(_:)](quartz/qcview/stop(_:).md)
