CameraCaptureAccessory
A scene accessory that presents content during camera capture.
Declaration
nonisolated struct CameraCaptureAccessory<Content> where Content : ViewOverview
The accessory may be presented while the app is in the foreground and has an active camera capture session. The system determines whether and where to present it. Unlike ExternalNonInteractiveAccessory, the content can be interactive.
For example, you can present a teleprompter that the person being captured can read while looking toward the camera:
struct CameraRootView: View {
@State private var model = TeleprompterModel()
var body: some View {
CameraView(model: model)
.sceneAccessory {
CameraCaptureAccessory {
TeleprompterView(model: model)
}
}
}
}