📷A image picker for iOS , written by Swift.(support preview the image)
refer: teambition/PhotoPicker
Specify "PhotoPicker" in your Cartfile:
github "StormXX/PhotoPicker"
run carthage update
to fetch the PhotoBrowser. Becaust this PhotoPicker support previewing the photo
//MARK: - public property
open weak var delegate: PhotoPickerDelegate?
open var assetCollectionSubtypes: [PHAssetCollectionSubtype]?
open var allowMultipleSelection: Bool = true
open var minimumNumberOfSelection: Int = 1
open var maximumNumberOfSelection: Int = 9
open var mediaType: PhotoPickerMediaType = .any
open var prompt: String?
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)
let photoPickerController = PhotoPickerController()
photoPickerController.delegate = self
presentViewController(photoPickerController, animated: true, completion: nil)
let localizedString: [String: String] = [
"PhotoPicker.Cancel": LocalizationString("PhotoPicker.Cancel"),
"PhotoPicker.OK": LocalizationString("PhotoPicker.OK"),
"PhotoPicker.Send": LocalizationString("PhotoPicker.Send"),
"PhotoPicker.Origin": LocalizationString("PhotoPicker.Origin"),
"PhotoPicker.MaximumNumberOfSelection.Alert": LocalizationString("PhotoPicker.MaximumNumberOfSelection.Alert"),
"PhotoPicker.Photos": LocalizationString("PhotoPicker.Photos"),
"PhotoPicker.Videos": LocalizationString("PhotoPicker.Videos"),
"PhotoPicker.Title" : LocalizationString("PhotoPicker.Title"),
"PhotoPicker.VideoSelect.Alert": LocalizationString("PhotoPicker.VideoSelect.Alert")
]
- QBImagePicker(This framework is written by Objective-C)
- Example app using Photos Framework(Apple PhotoKit Sample Code)
- iOS 8.0
- PhotoPicker is released under the MIT license. See LICENSE for details.
- Have a question? Please open an issue!