ImagePickerControllerDelegate
public protocol ImagePickerControllerDelegate: UINavigationControllerDelegate
The ImagePickerControllerDelegate protocol defines methods that interact with the image picker interface. The delegate is responsible for dismissing the picker when the operation completes.
-
Asks the delegate if the image picker should launch camera with certain permission status.
Declaration
Swift
func imagePickerController(_ picker: ImagePickerController, shouldLaunchCameraWithAuthorization status: AVAuthorizationStatus) -> Bool
-
Tells the delegate that picker has finished launching camera with an array of selected assets
Declaration
Swift
@objc optional func imagePickerController(_ picker: ImagePickerController, didFinishLaunchingCameraWith assets: [PHAsset])
-
Tells the delegate that the user picked image assets.
Declaration
Swift
func imagePickerController(_ picker: ImagePickerController, didFinishPickingImageAssets assets: [PHAsset])
-
Tells the delegate that the user cancelled the pick operation.
Declaration
Swift
func imagePickerControllerDidCancel(_ picker: ImagePickerController)
-
Optional. Asks the delegate for the photo album list to display. The image picker shows the camera roll and non-smart albums if not implemented.
Declaration
Swift
@objc optional func photoAlbumsForImagePickerController(_ picker: ImagePickerController) -> [PHFetchResult<PHAssetCollection>]
-
Optional. Asks the delegate for the transitioning delegate for presenting the album list. The default transition is used if not implemented.
Declaration
Swift
@objc optional func imagePickerController(_ picker: ImagePickerController, transitioningDelegateForPresentingAlbumsViewController controller: UIViewController) -> UIViewControllerTransitioningDelegate
-
Optional. Tells the delegate that the user selected an image asset.
Declaration
Swift
@objc optional func imagePickerController(_ picker: ImagePickerController, didSelectImageAsset asset: PHAsset)
-
Optional. Tells the delegate that the user deselected an image asset.
Declaration
Swift
@objc optional func imagePickerController(_ picker: ImagePickerController, didDeselectImageAsset asset: PHAsset)