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.

CameraKit properties

  • 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)

Init

  • 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.

Overridable Helper

  • 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)

Lenses Setup

  • 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()

CameraControllerUIDelegate

Adjustment Observer

Carousel

Camera Button

Ring Light Control Delegate

Presentation Delegate