Skip to content

AFNetworking+ImageActivityIndicator makes it easy to show an activity indicator while an image view's image is loading using AFNetworking.

License

Notifications You must be signed in to change notification settings

JRG-Developer/AFNetworking-ImageActivityIndicator

Repository files navigation

AFNetworking + ImageActivityIndicator

AFNetworking+ImageActivityIndicator makes it easy to show an activity indicator while an image view's image is loading using AFNetworking.

Installation with CocoaPods

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.

Manual Installation

Alternatively, you can manually include AFNetworking+ImageActivityIndicator in your project by doing the following:

  1. Clone this repo locally onto your computer, or press Download ZIP to simply download the latest master commit.

  2. Drag the AFNetworking+ImageActivityIndicator folder into your project, making sure Copy items into destination group's folder (if needed) is checked.

  3. Add AFNetworking 2.x to your project (it's a dependency of this library).

How to Use

AFNetworking+ImageActivityIndicator is designed to make showing an activity indicator while an image is loading use AFNetworking very easy:

  1. Add #import <AFNetworking+ImageActivityIndicator/AFNetworking+ImageActivityIndicator.h> wherever you need to show an activity indicator view while an image is loading using AFNetworking.

(Or just use #import "AFNetworking+ImageActivityIndicator.h" if you're not using CocoaPods / feeling adventurous.)

  1. 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];

  2. 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).

Contributing

Patches and feature additions are welcome!

To contribute:

  1. 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).

  1. Fork this repo.

  2. Make your changes.

  3. 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.

  1. 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.

  1. Submit a pull request, referencing your original issue from (1) above.

  2. Last but not least, sit back and enjoy your awesomeness in helping make your fellow developers' lives a bit easier!

LICENSE

Like AFNetworking, AFNetworking+ImageActivityIndicator is released under the MIT License. See the LICENSE file for more details.

About

AFNetworking+ImageActivityIndicator makes it easy to show an activity indicator while an image view's image is loading using AFNetworking.

Resources

License

Stars

Watchers

Forks

Packages

No packages published