Comments (8)
Try this:
pickerController.didSelectAssets = { (assets: [DKAsset]) in
print(assets.count)
dispatch_async(dispatch_get_global_queue(0, 0), {
let options = PHImageRequestOptions()
options.deliveryMode = .HighQualityFormat
options.synchronous = true
for (_, asset) in assets.enumerate() {
asset.fetchImageWithSize(PHImageManagerMaximumSize, options: options) { image, info in
self.images.append(image!)
}
}
print(self.images.count)
})
}
from dkimagepickercontroller.
The fetchOriginalImageWithCompleteBlock
method is executed on a background thread. You should print the self.images.count
after the all fetchOriginalImageWithCompleteBlock
are completed.
from dkimagepickercontroller.
it still same .. But when i use this code
for asset in assets {
asset.fetchImageWithSize(CGSize(width: 200, height: 200), options: PHImageRequestOptions?.init(), completeBlock: { (image, info) -> Void in
self.images.append(image!)
})
This give me all the value. When i change the CZsize according to original image. Then it again gives me less value
from dkimagepickercontroller.
thanks for replying . i used this code and most of time it crashed when selecting more than 1 photo..But some time it works ..
from dkimagepickercontroller.
Could you post the error stacktrace?
from dkimagepickercontroller.
i think i have infinite loop is going on there...I really appreciate that you are helping me
As you can see i selected 19 photos there
from dkimagepickercontroller.
Could you try to replace the condition
if let isInCloud = info?[PHImageResultIsInCloudKey]?.boolValue
where isInCloud && self.autoDownloadWhenAssetIsInCloud {
to
if let isInCloud = info?[PHImageResultIsInCloudKey]?.boolValue
where image == nil && isInCloud && self.autoDownloadWhenAssetIsInCloud {
Let me know if that works :)
from dkimagepickercontroller.
You are awesome. THANKS A LOT !!!! YOU saved my life. I was scratching my head ..calling my self totaly dumb..Thanks ..So the problem was downloading images from cloud ..Thanks Again
from dkimagepickercontroller.
Related Issues (20)
- Camera icon not showing when deploying in xcode13 HOT 3
- Localization not working
- Compilation error: "LLVM ERROR: out of memory" HOT 11
- Xcode 13.3 - Error (Xcode): Segmentation fault: 11 Encountered error while archiving for device. HOT 35
- Crash on DKCamera.captureImage function HOT 1
- How to get original files URLs?
- Xcode 14: Swift Compiler Error: Stored properties cannot be marked potentially unavailable with '@available' HOT 4
- ios error Signing for "DKImagePickerController-DKImagePickerController" requires a development team. HOT 14
- After changing to 4.3.4, Now i cant compile with BITCODE enabled HOT 4
- XCode 14 Build error: Stored properties cannot be marked potentially unavailable with '@available' HOT 16
- I want to export the video to .mp4
- xcode14中不兼容ios12系统
- No Actions when clicking in Camera Icon, it should open camera to capture
- How to perform Multiple Image selection but only single video selection
- Xcode 13 升级 14后,运行到真机没有问题但是打包会报错 HOT 4
- Error output from CocoaPods:
- Add tag 4.3.5 or higher to enable Swift Package Manager versioning support HOT 1
- Add tags to dependend packages in order to be able to fetch DKImagePickerController with a versioned rule
- Library not loaded: @rpath/DKImagePickerController.framework/DKImagePickerController HOT 1
- Support App Privacy Manifests HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dkimagepickercontroller.