Closed
Description
New Feature Request Checklist
- I have checked the current documentations or APIs and did not find a solution
- I have searched for a similar issue in the project and found none
Feature Request Description
Currently, you make a NSURL
from PHAsset
like this:
// Create with `PHAsset`
let asset: PHAsset
let photosURL = NSURL.sd_URL(with: asset)
// Load image (assume using custom manager)
imageView.sd_setImage(with: photosURL, placeholderImage: nil, context: [.customManager: manager])
However, sd_setImage(with:
takes a URL
, not NSURL
.
I would like to be able to get a URL
from PHAsset
, something like this:
// Create with `PHAsset`
let asset: PHAsset
let photosURL = URL.sd_URL(with: asset) /// URL not NSURL
// Load image (assume using custom manager)
imageView.sd_setImage(with: photosURL, placeholderImage: nil, context: [.customManager: manager])
This would avoid the error, and I think URLs are safer than NSURLs.
Metadata
Metadata
Assignees
Labels
No labels