PHImageKit is simple yet powerful image downloading, caching and GIF playback framework.
PHImageKit is the component that powers all the images and GIFs in the Product Hunt iOS App 😻
CocoaPods is a dependency manager for Objective-C and swift, which automates and simplifies the process of using 3rd-party libraries like PHImageKit.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'PHImageKit'
Then, run the following command:
$ pod install
Replace your usage of UIImageView
with PHImageView
. Then simply pass your image url.
imageView.url = NSURL(string: "http://your_image_url.png")!
And that's it. 🚀
You can configure the appearance of PHImageView
Parameter | Description | Defined in | Default state |
---|---|---|---|
showLoadingIndicator | Shows a loading indicator during download | PHImageView |
true | ||
animatedTransition | Cross dissolve animated transition | PHImageView |
true | ||
setCacheSize | Set max file and memory cache size in MB | PHManager |
memory : 50mb file : 250mb |
iOS 8.0+ Xcode 7.0 or above
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)placeholder image
Objective C
compatibilityUserPlay
for GIFs _________________
< The MIT License >
-----------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||