Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

alibaba-archive/PhotoPicker

Repository files navigation

PhotoPicker

A image picker for iOS , written by Swift.

How To Get Started

Carthage

Specify "PhotoPicker" in your Cartfile:

github "teambition/PhotoPicker"

Usage

configuration properties
// use this to fetch what type album you want
public var assetCollectionSubtypes: [PHAssetCollectionSubtype]?
// if you want to select more than 1 photo, set it to true
public var allowMultipleSelection: Bool

Implement delegate
func photoPickerController(controller: PhotoPickerController, didFinishPickingAssets assets: [PHAsset], needHighQualityImage: Bool)
func photoPickerControllerDidCancel(controller: PhotoPickerController)
func photoPickerController(controller: PhotoPickerController, shouldSelectAsset asset: PHAsset) -> Bool
func photoPickerController(controller: PhotoPickerController, didSelectAsset asset: PHAsset)
func photoPickerController(controller: PhotoPickerController, didDeselectAsset asset: PHAsset)
Present PhotoPicker
let photoPickerController = PhotoPickerController()
photoPickerController.delegate = self
presentViewController(photoPickerController, animated: true, completion: nil)

Similar

Minimum Requirement

  • iOS 8.0

Release Notes

License

  • GrowingTextView is released under the MIT license. See LICENSE for details.

More Info