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.
-
A controller which manages the camera and lenses stack on behalf of the view controller
Declaration
Swift
public let cameraController: CameraController
-
App orientation delegate to control app orientation
Declaration
Swift
public weak var appOrientationDelegate: AppOrientationDelegate?
-
Undocumented
Declaration
Swift
public let cameraView: CameraView
-
Undocumented
Declaration
Swift
override open func loadView()
-
Undocumented
Declaration
Swift
override open func viewDidLoad()
-
Undocumented
Declaration
Swift
override open func viewDidAppear(_ animated: Bool)
-
Undocumented
Declaration
Swift
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
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)
-
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)
-
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()
-
Declaration
Swift
open func cameraController(_ controller: CameraController, updatedLenses lenses: [Lens])
-
Declaration
Swift
open func cameraControllerRequestedActivityIndicatorShow(_ controller: CameraController)
-
Declaration
Swift
open func cameraControllerRequestedActivityIndicatorHide(_ controller: CameraController)
-
Declaration
Swift
open func cameraControllerRequestedRingLightShow(_ controller: CameraController)
-
Declaration
Swift
open func cameraControllerRequestedRingLightHide(_ controller: CameraController)
-
Declaration
Swift
open func cameraControllerRequestedFlashControlHide(_ controller: CameraController)
-
Declaration
Swift
open func cameraControllerRequestedCameraFlip(_ controller: CameraController)
-
Declaration
Swift
open func cameraController( _ controller: CameraController, requestedHintDisplay hint: String, for lens: Lens, autohide: Bool )
-
Declaration
Swift
open func cameraController(_ controller: CameraController, requestedHintHideFor lens: Lens)
-
Undocumented
Declaration
Swift
public func processorUpdatedAdjustmentsAvailability(_ adjustmentsProcessor: AdjustmentsProcessor)
-
Declaration
Swift
public func carouselView(_ view: CarouselView, didSelect item: CarouselItem, at index: Int)
-
Declaration
Swift
public func itemsForCarouselView(_ view: CarouselView) -> [CarouselItem]
-
Declaration
Swift
public func cameraButtonTapped(_ cameraButton: CameraButton)
-
Declaration
Swift
public func cameraButtonHoldBegan(_ cameraButton: CameraButton)
-
Declaration
Swift
public func cameraButtonHoldCancelled(_ cameraButton: CameraButton)
-
Declaration
Swift
public func cameraButtonHoldEnded(_ cameraButton: CameraButton)
-
Declaration
Swift
public func flashControlView(_ view: FlashControlView, updatedRingLightValue value: Float)
-
Declaration
Swift
public func flashControlView(_ view: FlashControlView, selectedRingLightColor color: UIColor)
-
Declaration
Swift
public func flashControlView(_ view: FlashControlView, updatedFlashMode flashMode: CameraController.FlashMode)
-
Undocumented
Declaration
Swift
open func presentationControllerWillDismiss(_ presentationController: UIPresentationController)