CameraViewController

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

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

    convenience public 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

    convenience public 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

    public init(cameraController: CameraController)

    Parameters

    cameraController

    the camera controller to use.

  • Undocumented

    Declaration

    Swift

    required public init?(coder: NSCoder)

Overridable Helper

  • get message to display in popup view for selected lens

    Declaration

    Swift

    open func getMessage(lens: Lens) -> String

    Parameters

    lens

    selected lens

  • Displays a message indicating that a specified lens has been displayed

    Declaration

    Swift

    open func showMessage(lens: Lens)

    Parameters

    lens

    the lens to display info for.

  • Undocumented

    Declaration

    Swift

    public override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator)

Lenses Setup

  • Apply a specific lens

    Declaration

    Swift

    open func applyLens(_ lens: Lens)

    Parameters

    lens

    selected lens

  • Helper function to clear currently selected lens

    Declaration

    Swift

    open func clearLens()

CameraControllerUIDelegate

Adjustment Observer

Carousel

Camera Button

Ring Light Control Delegate

Presentation Delegate