CreationKit Documentation

Class Image​Picker​Manager

public final class ImagePickerManager: NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate  
ImagePickerManager ImagePickerManager UINavigationControllerDelegate UINavigationControllerDelegate ImagePickerManager->UINavigationControllerDelegate UIImagePickerControllerDelegate UIImagePickerControllerDelegate ImagePickerManager->UIImagePickerControllerDelegate NSObject NSObject ImagePickerManager->NSObject

Conforms To

NSObject
UIImagePickerControllerDelegate
UINavigationControllerDelegate

Initializers

init(presentation​Controller:​did​Select​Image:​)

public init(
    presentationController: UIViewController,
    didSelectImage: @escaping ((_ image: UIImage?, _ assetName: String) -> Void))  

Creates a new manager to handling an image picker.

Parameters

presentation​Controller UIView​Controller

The controller that will present the image picker.

did​Select​Image @escaping ((_ image:​ UIImage?, _ asset​Name:​ String) -> Void)

A closure that will be called when an image is selected. The image sent will be the full sized image. It is your responsibility to compress this if need be.

Properties

compression​Image​Quality

public var compressionImageQuality: ImageQuality  = .medium

Methods

present()

public func present()  

image​Picker​Controller​Did​Cancel(_:​)

func imagePickerControllerDidCancel(_ picker: UIImagePickerController)  

image​Picker​Controller(_:​did​Finish​Picking​Media​With​Info:​)

func imagePickerController(
    _ picker: UIImagePickerController,
    didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any])