---
title: "stopCapture(handler:)"
framework: replaykit
role: symbol
role_heading: Instance Method
path: "replaykit/rpscreenrecorder/stopcapture(handler:)"
---

# stopCapture(handler:)

Stops screen capture

## Declaration

```swift
func stopCapture(handler: (((any Error)?) -> Void)? = nil)
```

## Parameters

- `handler`: A block that is called when screen capture has stopped.

## See Also

### Controlling App Recording

- [startRecording(handler:)](replaykit/rpscreenrecorder/startrecording(handler:).md)
- [stopRecording(handler:)](replaykit/rpscreenrecorder/stoprecording(handler:).md)
- [stopRecording(withOutput:completionHandler:)](replaykit/rpscreenrecorder/stoprecording(withoutput:completionhandler:).md)
- [startCapture(handler:completionHandler:)](replaykit/rpscreenrecorder/startcapture(handler:completionhandler:).md)
- [RPSampleBufferType](replaykit/rpsamplebuffertype.md)
- [discardRecording(handler:)](replaykit/rpscreenrecorder/discardrecording(handler:).md)
- [startRecording(withMicrophoneEnabled:handler:)](replaykit/rpscreenrecorder/startrecording(withmicrophoneenabled:handler:).md)
