Class
ImagePickerManager
public final class ImagePickerManager: NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate
Relationships
Conforms To
NSObject
UIImagePickerControllerDelegate
UINavigationControllerDelegate
Initializers
init(presentationController:didSelectImage:)
public init(
presentationController: UIViewController,
didSelectImage: @escaping ((_ image: UIImage?, _ assetName: String) -> Void))
Creates a new manager to handling an image picker.
Parameters
Name | Type | Description |
---|---|---|
presentationController | UIViewController |
The controller that will present the image picker. |
didSelectImage | @escaping ((_ image: UIImage?, _ assetName: 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
compressionImageQuality
public var compressionImageQuality: ImageQuality = .medium
Methods
present()
public func present()
imagePickerControllerDidCancel(_:)
func imagePickerControllerDidCancel(_ picker: UIImagePickerController)
imagePickerController(_:didFinishPickingMediaWithInfo:)
func imagePickerController(
_ picker: UIImagePickerController,
didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any])