How do I select multiple images for an image picker and then return as an image? (2-5)
2 answers
I worked out using this : https://github.com/zhangao0086/DKImagePickerController .
Getting selected image thumbnail images:
let pickerController = DKImagePickerController()
pickerController.sourceType = .Photo
pickerController.didCancelled = { () in
println("didCancelled")
}
pickerController.didSelectedAssets = { [unowned self] (assets: [DKAsset]) in
println("didSelectedAssets")
println(assets)
for(var i = 0; i<(assets.count); i++){
print(assets[i].url)
self.PickedArray .addObject(assets[i].thumbnailImage!)
}
self.performSegueWithIdentifier("SegueToPhotoLibraryView", sender: self)
Getting selected image urls :
assets[i].url instead of assets[i].thumbnailImage
Hope it helps!
+1
source to share
IOS does not currently provide an out-of-the-box image picker that allows you to select multiple images from a photo library. UIImagePickerController only allows one image to be selected.
But there are several image picker implementations that allow you to select multiple images. You can find a whole bunch at cocoacontrols.com as @ytbryan mentioned.
I do not currently know of a single multiple set of images implemented in Swift. If anyone finds it, please edit and post the link.
0
source to share