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

Haneke v1.0.0 #35

Merged
merged 95 commits into from
Sep 19, 2014
Merged

Haneke v1.0.0 #35

merged 95 commits into from
Sep 19, 2014

Conversation

hpique
Copy link
Member

@hpique hpique commented Aug 22, 2014

Haneke v1.0.0 is a major refactoring with improvements on all fronts and minor bug fixes.

Here's a changelog. For more info check out this blog post.

New components

  • UIButton+Haneke: UIButton category that reduces setting foreground or background images from network or disk to one line, like UIImageView+Haneke beforehand.
  • HNKNetwortFetcher and HNKDiskFetcher: classes that encapsulate fetching images from network and disk respectively, making it simpler to use Haneke from any layer of your app while also providing more extension points (e.g., HNKNetworkFetcher can be subclassed to use a custom URL session).
  • HNKDiskCache: standalone disk cache for any kind of data.
  • Haneke+AFNetworking: an official extension to use AFNetworking for image downloads.

API Changes

  • HNKCache: All asynchronous fetch operations are aptly named fetch* and accept success and failure blocks (instead of a single completion block).
  • UIImageView+Haneke: placeholderImage parameter has been renamed to placeholder for brevity.
  • UIImageView+Haneke: hnk_cancelImageRequest has been renamed to hnk_cancelSetImage.
  • HNKErrorDiskCacheMiss has been renamed to HNKErrorImageNotFound.
  • HNKCacheEntity has been renamed to HNKFetcher and the protocol has been changed to support asynchronous image fetching.

Bug fixes

  • Replacing an image in the cache didn't update the disk size properly.
  • Fixed documentation bugs.
  • Networks requests with error status code succeeded if the received data was a valid image. Thanks @quellish!

Code improvements

  • Added dozens of unit tests and increased test coverage to 99%.
  • UIKit categories use weak references for better performance. Thanks @damienrambout!
  • Stopped escaping spaces in disk cache file names. This makes debugging easier.

I'll the PR open for a while in case anyone wants to play with it before the official release.

@hpique hpique changed the title Haneke v1.0 Haneke v1.0.0 Aug 22, 2014
hpique added a commit that referenced this pull request Sep 19, 2014
@hpique hpique merged commit 56a328a into master Sep 19, 2014
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

Successfully merging this pull request may close these issues.

1 participant