---
title: cancel()
framework: photos
role: symbol
role_heading: Instance Method
path: photos/phlivephotoeditingcontext/cancel()
---

# cancel()

Aborts any Live Photo processing in progress.

## Declaration

```swift
func cancel()
```

## Discussion

Discussion This method applies only after you’ve begun processing a Live Photo for display or output with the init(livePhotoEditingInput:) or saveLivePhoto(to:options:completionHandler:) method. After you call this method, Photos calls your completion handler and provides an error with the PHLivePhotoEditingErrorCode.aborted error code.

## See Also

### Processing an Editing Context’s Live Photo

- [saveLivePhoto(to:options:completionHandler:)](photos/phlivephotoeditingcontext/savelivephoto(to:options:completionhandler:).md)
- [prepareLivePhotoForPlayback(withTargetSize:options:completionHandler:)](photos/phlivephotoeditingcontext/preparelivephotoforplayback(withtargetsize:options:completionhandler:).md)
- [PHLivePhotoEditingOption](photos/phlivephotoeditingoption.md)
