Skip to content
This repository was archived by the owner on May 3, 2021. It is now read-only.

Better DFImageTaskCompletion completion block #37

Closed
kean opened this issue Jul 24, 2015 · 1 comment
Closed

Better DFImageTaskCompletion completion block #37

kean opened this issue Jul 24, 2015 · 1 comment
Assignees
Milestone

Comments

@kean
Copy link
Owner

kean commented Jul 24, 2015

Changes to completion block:

  • Remove user info dictionary
  • Add error argument
  • Add DFImageResponse (new class) argument
  • Add DFImageTask argument

Completion block should follow simple rules:

  • If there is an error, there is no image and no response
  • If there is no image and no response, there is always an error

Other changes:

  • DFImageFetching protocol and DFImageManagerImageLoader should no longer use DFImageResponse class
  • Add public response (DFImageResponse) property to DFImageTask
  • Update DFCompositeImageTaskImageHandler to reflect DFImageTaskCompletion changes
  • Update DFImageView interface to reflect DFImageTaskCompletion changes

These changes would allow for better compiler checks, better discoverability of APIs and better performance.

@kean kean self-assigned this Jul 24, 2015
@kean kean added this to the 0.5.1 milestone Jul 24, 2015
@kean kean changed the title Safer DFImageTaskCompletion completion block Better DFImageTaskCompletion completion block Jul 24, 2015
@kean
Copy link
Owner Author

kean commented Jul 24, 2015

Done

@kean kean closed this as completed Jul 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant