screenRecorder(_:didStopRecordingWithError:previewViewController:)
Indicates that the screen recording has stopped.
Declaration
optional func screenRecorder(_ screenRecorder: RPScreenRecorder, didStopRecordingWithError error: any Error, previewViewController: RPPreviewViewController?)Parameters
- screenRecorder:
The Rpscreenrecorder instance.
- error:
An Nserror describing why the recording stopped.
- previewViewController:
An Rppreviewviewcontroller interface object that is returned if anything at all was recorded. The interface allows the user to preview and edit the recording.
Discussion
screenRecorder(_:didStopRecordingWithError:previewViewController:) is called when recording stops due to an error or a change in recording availability. If any part of the stopped recording is available, an instance of RPPreviewViewController is returned.