CameraViewController
@MainActor
open class CameraViewController : UIViewController, CameraControllerUIDelegate
extension CameraViewController: AdjustmentsProcessorObserver
extension CameraViewController: CarouselViewDelegate, CarouselViewDataSource
extension CameraViewController: CameraButtonDelegate
extension CameraViewController: FlashControlViewDelegate
extension CameraViewController: UIAdaptivePresentationControllerDelegate
This is the default view controller which handles setting up the camera, lenses, carousel, etc.
-
A controller which manages the camera and lenses stack on behalf of the view controller
Declaration
Swift
@MainActor public let cameraController: CameraController
-
App orientation delegate to control app orientation
Declaration
Swift
@MainActor public weak var appOrientationDelegate: AppOrientationDelegate?
-
Undocumented
Declaration
Swift
@MainActor public let cameraView: CameraView
-
Undocumented
Declaration
Swift
@MainActor override open func loadView()
-
Undocumented
Declaration
Swift
@MainActor override open func viewDidLoad()
-
Undocumented
Declaration
Swift
@MainActor override open func viewDidAppear(_ animated: Bool)
-
Undocumented
Declaration
Swift
@MainActor override open func viewDidDisappear(_ animated: Bool)
-
Returns a camera view controller initialized with a camera controller that is configured with a newly created AVCaptureSession stack and CameraKit session with the specified configuration and list of group IDs.
Declaration
Swift
@MainActor public convenience init(repoGroups: [String], sessionConfig: SessionConfig? = nil)
Parameters
repoGroups
List of group IDs to observe.
sessionConfig
Config to configure session with application id and api token. Pass this in if you wish to dynamically update or overwrite the application id and api token in the application’s
Info.plist
. -
Convenience init to configure a camera controller with a specified AVCaptureSession stack, CameraKit, and list of group IDs.
Declaration
Swift
@MainActor public convenience init(cameraKit: CameraKitProtocol, captureSession: AVCaptureSession, repoGroups: [String])
Parameters
cameraKit
camera kit session
captureSession
a backing AVCaptureSession to use
repoGroups
the group IDs to observe
-
Initialize the view controller with a preconfigured camera controller
Declaration
Swift
@MainActor public init(cameraController: CameraController)
Parameters
cameraController
the camera controller to use.
-
get message to display in popup view for selected lens
Declaration
Swift
@MainActor open func getMessage(lens: Lens) -> String
Parameters
lens
selected lens
-
Displays a message indicating that a specified lens has been displayed
Declaration
Swift
@MainActor open func showMessage(lens: Lens)
Parameters
lens
the lens to display info for.
-
Undocumented
Declaration
Swift
@MainActor override public func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator)
-
Apply a specific lens
Declaration
Swift
@MainActor open func applyLens(_ lens: Lens)
Parameters
lens
selected lens
-
Helper function to clear currently selected lens
Declaration
Swift
@MainActor open func clearLens()
-
Declaration
Swift
@MainActor open func cameraController(_ controller: CameraController, updatedLenses lenses: [Lens])
-
Declaration
Swift
@MainActor open func cameraControllerRequestedActivityIndicatorShow(_ controller: CameraController)
-
Declaration
Swift
@MainActor open func cameraControllerRequestedActivityIndicatorHide(_ controller: CameraController)
-
Declaration
Swift
@MainActor open func cameraControllerRequestedRingLightShow(_ controller: CameraController)
-
Declaration
Swift
@MainActor open func cameraControllerRequestedRingLightHide(_ controller: CameraController)
-
Declaration
Swift
@MainActor open func cameraControllerRequestedFlashControlHide(_ controller: CameraController)
-
Declaration
Swift
@MainActor open func cameraControllerRequestedSnapAttributionViewShow(_ controller: CameraController)
-
Declaration
Swift
@MainActor open func cameraControllerRequestedSnapAttributionViewHide(_ controller: CameraController)
-
Declaration
Swift
@MainActor open func cameraControllerRequestedCameraFlip(_ controller: CameraController)
-
Declaration
Swift
@MainActor open func cameraController( _ controller: CameraController, requestedHintDisplay hint: String, for lens: Lens, autohide: Bool )
-
Declaration
Swift
@MainActor open func cameraController(_ controller: CameraController, requestedHintHideFor lens: Lens)
-
Undocumented
Declaration
Swift
@MainActor public func processorUpdatedAdjustmentsAvailability(_ adjustmentsProcessor: AdjustmentsProcessor)
-
Declaration
Swift
@MainActor public func carouselView(_ view: CarouselView, didSelect item: CarouselItem, at index: Int)
-
Declaration
Swift
@MainActor public func itemsForCarouselView(_ view: CarouselView) -> [CarouselItem]
-
Declaration
Swift
@MainActor public func cameraButtonTapped(_ cameraButton: CameraButton)
-
Declaration
Swift
@MainActor public func cameraButtonHoldBegan(_ cameraButton: CameraButton)
-
Declaration
Swift
@MainActor public func cameraButtonHoldCancelled(_ cameraButton: CameraButton)
-
Declaration
Swift
@MainActor public func cameraButtonHoldEnded(_ cameraButton: CameraButton)
-
Declaration
Swift
@MainActor public func flashControlView(_ view: FlashControlView, updatedRingLightValue value: Float)
-
Declaration
Swift
@MainActor public func flashControlView(_ view: FlashControlView, selectedRingLightColor color: UIColor)
-
Declaration
Swift
@MainActor public func flashControlView(_ view: FlashControlView, updatedFlashMode flashMode: CameraController.FlashMode)
-
Undocumented
Declaration
Swift
@MainActor open func presentationControllerWillDismiss(_ presentationController: UIPresentationController)