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

Better DFImageTaskCompletion completion block #37

@kean

Description

@kean

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions