Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

" url = nil" does not seem to work. #25

Closed
eastswift opened this issue Jan 6, 2018 · 2 comments
Closed

" url = nil" does not seem to work. #25

eastswift opened this issue Jan 6, 2018 · 2 comments

Comments

@eastswift
Copy link

To insert an image of an asset, do the following:

for i in 0 ..< images.count - 1 {
manager.requestImage(for: images[i],
targetSize: CGSize(width: 100, height: 100.0),
contentMode: .aspectFill,
options: nil) { (result, _) in
print(result)
let resultphoto = Photo(image: result, url: nil)
self.photos.append(resultphoto)
}

I have obviously put nil in the url, but I keep trying to download it. The image is imported from the asset.

   self.urlSession.dataTask(with: self.photos[indexPath.row].url!) { [weak self] (data, response, error) in
        guard let uData = data else {
            return
        }   

I get an error here.

@alexhillc
Copy link
Owner

Hey @eastswift, thanks for the report. I’ll take a look at this when I get some time!

@alexhillc
Copy link
Owner

This looks like it was simply a bug in the example project, which I had thrown together very sloppily to test out the framework. Sorry about that! Fixed in the latest commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants