CameraViewController

@objc(PESDKCameraViewController) open class CameraViewController: UIViewController

The CameraViewController class provides a dialog to perform serveral tasks regarding the camera. These include taking photos, switching on the flash, and such.

  • Initializes a camera view controller using the given parameters.

    Discussion

    If you use the standard init method or initWithCoder to initialize a CameraViewController object, a camera view controller with all supported recording modes and the default configuration is created.

    Declaration

    Swift

    public init(configuration: Configuration = Configuration())

    Parameters

    configuration

    An Configuration object.

    Return Value

    And initialized CameraViewController.

  • The view that contains the background views.

    Declaration

    Swift

    fileprivate(set) open lazy var backgroundContainerView: UIView =
  • The view that contains all view positioned at the top of the screen.

    Declaration

    Swift

    fileprivate(set) open lazy var topControlsView: UIView =
  • The view that serves as container for the actual preview.

    Declaration

    Swift

    fileprivate(set) open lazy var cameraPreviewContainer: UIView =
  • The view that contains all view positioned at the bottom of the screen.

    Declaration

    Swift

    fileprivate(set) open lazy var bottomControlsView: UIView =
  • The view that contains actions button that is used to initiate the photo capturing process.

    Declaration

    Swift

    fileprivate(set) open lazy var actionButtonContainer: UIView =
  • The label that is used to display the current recording time.

    Declaration

    Swift

    fileprivate(set) open lazy var recordingTimeLabel: UILabel =
  • The button that is used to initiate the photo capturing process.

    Declaration

    Swift

    fileprivate(set) open var actionButton: UIControl?
  • The view that is used to select the current filter that is applied to the preview.

    Declaration

    Swift

    fileprivate(set) open lazy var filterSelectionButton: Button =
  • The slider that is used to control the inensity of the previewed filter.

    Declaration

    Swift

    fileprivate(set) open lazy var filterIntensitySlider: Slider =
  • The recognizer that detects a swipe gesture to the right.

    Declaration

    Swift

    fileprivate(set) open lazy var swipeRightGestureRecognizer: UISwipeGestureRecognizer =
  • The recognizer that detects a swipe gesture to the left.

    Declaration

    Swift

    fileprivate(set) open lazy var swipeLeftGestureRecognizer: UISwipeGestureRecognizer =
  • The instance of a FilterSelectionController that is used to select the current preview filter.

    Declaration

    Swift

    open let filterSelectionController = FilterSelectionController()
  • The camera controller that is used by the controller.

    Declaration

    Swift

    fileprivate(set) open var cameraController: CameraController?
  • The block that is called once the capture process has finished.

    Declaration

    Swift

    open var completionBlock: ((UIImage?, URL?) -> Void)?
  • This function gets the most recent image form the camera roll, and sets it as preview image for the according button.

    Declaration

    Swift

    open func setLastImageFromRollAsPreview()
  • Takes a photo.

    Declaration

    Swift

    open func takePhoto(_ sender: Button?)

    Parameters

    sender

    The object that initiated the request.

  • Toggles video recording.

    Declaration

    Swift

    open func recordVideo(_ sender: VideoRecordButton?)

    Parameters

    sender

    Sender of the event.