---
title: cancel()
framework: social
role: symbol
role_heading: Instance Method
path: social/slcomposeserviceviewcontroller/cancel()
---

# cancel()

Starts the animated dismissal of the compose view.

## Declaration

```swift
func cancel()
```

## Discussion

Discussion When the cancel animation finishes, this method calls didSelectCancel(). A subclass shouldn’t need to override cancel. In rare cases a subclass may call cancel, such as in response to a catastrophic failure during user interaction with the compose view.
