AFNetworking+ImageActivityIndicator
makes it easy to show an activity indicator while an image view's image is loading using AFNetworking
.
The easiest way to add AFNetworking+ImageActivityIndicator
to your project is using CocoaPods. Simply add the following to your Podfile:
pod 'AFNetworking+ImageActivityIndicator', '~> 1.0'
Then run pod install
as you normally would.
Alternatively, you can manually include AFNetworking+ImageActivityIndicator
in your project by doing the following:
-
Clone this repo locally onto your computer, or press
Download ZIP
to simply download the latestmaster
commit. -
Drag the
AFNetworking+ImageActivityIndicator
folder into your project, making sureCopy items into destination group's folder (if needed)
is checked. -
Add AFNetworking 2.x to your project (it's a dependency of this library).
AFNetworking+ImageActivityIndicator
is designed to make showing an activity indicator while an image is loading use AFNetworking
very easy:
- Add
#import <AFNetworking+ImageActivityIndicator/AFNetworking+ImageActivityIndicator.h>
wherever you need to show an activity indicator view while an image is loading usingAFNetworking
.
(Or just use #import "AFNetworking+ImageActivityIndicator.h"
if you're not using CocoaPods / feeling adventurous.)
-
Call any of the new
~ usingActivityIndicatorStyle:
methods. In example,UIImageView *imageView = // ... get/create the image view [imageView setImageWithURL:[NSURL URLWithString:@"http://example.com"] usingActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
-
Not sure how a method is supposed to work?
See UIImageView+AFNetworking_UIActivityIndicatorView.h
for in-line documentation comments (or search CocoaDocs for AFNetworking+ImageActivityIndicator
for a browser-friendly version of the documentation).
Patches and feature additions are welcome!
To contribute:
- Open a new issue and propose your change- before writing code- to make sure the open source community agrees it's needed.
Make sure to include your rationale for why this change is needed (especially for new method/feature additions).
-
Fork this repo.
-
Make your changes.
-
Write unit tests for your changes (as needed). If possible, a TDD approach is best!
If you've never written unit tests before, that's okay!
You can learn by checking out Jon Reid's (@qcoding) excellent website, including a section just about unit testing.
- Write in-line documentation comments for your property/method additions.
This project is part of the CocoaPods specs repo, which includes appledoc-parsed documentation hosted for each pod on CocoaDocs.
If you're not familar with appledoc, check out Mattt Thompson's (@matt) introductory post about it.
-
Submit a pull request, referencing your original issue from (1) above.
-
Last but not least, sit back and enjoy your awesomeness in helping make your fellow developers' lives a bit easier!
Like AFNetworking
, AFNetworking+ImageActivityIndicator
is released under the MIT License. See the LICENSE
file for more details.