Skip to content

Instantly share code, notes, and snippets.

@rorodriguez116
Last active October 22, 2020 16:05
Show Gist options
  • Save rorodriguez116/ba0feca00cbfd8530b316664b85dbae6 to your computer and use it in GitHub Desktop.
Save rorodriguez116/ba0feca00cbfd8530b316664b85dbae6 to your computer and use it in GitHub Desktop.
Published properties UI will react to from CamerService
public class CameraService {
typealias PhotoCaptureSessionID = String
// MARK: Observed Properties UI must react to
// 1.
@Published public var flashMode: AVCaptureDevice.FlashMode = .off
// 2.
@Published public var shouldShowAlertView = false
// 3.
@Published public var shouldShowSpinner = false
// 4.
@Published public var willCapturePhoto = false
// 5.
@Published public var isCameraButtonDisabled = true
// 6.
@Published public var isCameraUnavailable = true
// 8.
@Published public var photo: Photo?
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment