Git Product home page Git Product logo

jgprogresshud's Introduction

JGProgressHUD

Simple, powerful and modern progress HUD for iOS.

Overview ==========

The ultimate progress HUD for iOS has arrived: JGProgressHUD!
• Super simple to implement.
• Feature-rich.
• Easy extensibility and customization (custom animations, indicator views and more).
• Up to date and modern, example: Blurred HUD (iOS 8), parallax effect (iOS 7).
• Backward compatibility to iOS 5.
• Well documented and maintained.
• Detects and repositions when keyboards appear/disappear.
• Voice Over/UIAccessibility support.
• And most importantly, it looks good!

The Examples project contains all kinds of different uses of JGProgressHUD. Check out the code and see what JGProgressHUD can do!
#####Current Version: 1.3 GitHub license
CocoaPods Carthage compatible ##Customization:

###Styles: JGProgressHUD can be displayed in 3 styles:
Extra Light
Light
Dark

###Indicator Views: By default a HUD will display an indeterminate progress indicator. You can not show an indicator view at all by setting the indicatorView property to nil. These indicator views are available:
Indeterminate progress indicator
Pie progress indicator
Ring progress indicator
Success indicator
Error indicator
Image indicator
By subclassing JGProgressHUDIndicatorView you can create a custom indicator view!

###Animations: By default a HUD will use a fade animation. Several parameters can be altered such as animation duration or animation curve. A HUD can be displayed without animation and different animations can be used. By default there are the following animations built in:
Fade
Zoom and Fade

By subclassing JGProgressHUDAnimation you can create a custom animation!

To dim the content behind the HUD set your dim color as backgroundColor of your JGProgressHUD instance.

Requirements

• Base SDK of iOS 8 or higher.
• Deployment target of iOS 5.0 or higher.
• ARC.

• JGProgressHUD can also be used by projects written in Swift. See Installation for details.

Documentation

Detailed documentation can be found on CocoaDocs.

Each method is well documented, making it easy to quickly get a great overview of JGProgressHUD. To start, see JGProgressHUD.h.

Examples

#####Showing indeterminate progress:

JGProgressHUD *HUD = [JGProgressHUD progressHUDWithStyle:JGProgressHUDStyleDark];
HUD.textLabel.text = @"Loading";
[HUD showInView:self.view];
[HUD dismissAfterDelay:3.0];

This displays a dark HUD with a spinner and the title "Loading", it is presented with a fade animation and is dismissed after 3 seconds with a fade animation.
#####Showing an error message:

JGProgressHUD *HUD = [JGProgressHUD progressHUDWithStyle:JGProgressHUDStyleDark];
HUD.textLabel.text = @"Error";
HUD.indicatorView = [[JGProgressHUDErrorIndicatorView alloc] init]; //JGProgressHUDSuccessIndicatorView is also available
[HUD showInView:self.view];
[HUD dismissAfterDelay:3.0];

#####Showing a custom image:

JGProgressHUD *HUD = [JGProgressHUD progressHUDWithStyle:JGProgressHUDStyleDark];
HUD.indicatorView = [[JGProgressHUDImageIndicatorView alloc] initWithImage:[UIImage imageNamed:@"my_image.png"]];
[HUD showInView:self.view];
[HUD dismissAfterDelay:3.0];

#####Showing determinate progress:

JGProgressHUD *HUD = [JGProgressHUD progressHUDWithStyle:JGProgressHUDStyleDark];
HUD.indicatorView = [[JGProgressHUDPieIndicatorView alloc] initWithHUDStyle:HUD.style]; //Or JGProgressHUDRingIndicatorView
[HUD showInView:self.view];
[HUD dismissAfterDelay:3.0];

Important: You should always show HUDs in a UIViewController's view.

See the Examples project for more example implementations.

Installation

CocoaPods:
Add this to your Podfile:

pod 'JGProgressHUD'

OR:

Carthage:
Add this to your `Cartfile`: ``` github "JonasGessner/JGProgressHUD" >= 1.2.6 ```
OR:

Framework (iOS >= 8.0 only):
1. Drag the `JGProgressHUD.xcodeproj` file into your Xcode project.
2. Add `JGProgressHUD.framework` to "Embedded Binaries" in the "General" tab of your project's target.
3. Add the `-ObjC` flag to "Other Linker Flags" in the "Build Settings" tab of your project's target.

See the Examples project for an example implementation of JGProgressHUD as framework.

After you have included JGProgressHUD as framework simply import `JGProgressHUD.h` like this: ```objc #import ``` Swift projects: ```swift import JGProgressHUD ```

OR:

Static Library:
1. Drag the `JGProgressHUD.xcodeproj` file into your Xcode project.
2. Add `JGProgressHUD` and `JGProgressHUD Resources` to "Target Dependencies" in the "Build Phases" tab of your project's target.
3. Add `libJGProgressHUD.a` to "Link Binary With Libraries".
4. From the `JGProgressHUD.xcodeproj`'s "Products" Directory drag the `JGProgressHUD Resources.bundle` into the "Copy Bundle Resources" section.
5. Add the `-ObjC` flag to "Other Linker Flags" in the "Build Settings" tab of your project's target.

See the Examples project for an example implementation of JGProgressHUD as static library.

After you have included JGProgressHUD as static library simply import `JGProgressHUD.h` like this: ```objc #import "JGProgressHUD.h" ``` Swift projects need to import JGProgressHUD in the Objective-C bridging header.

####RubyMotion An example of JGProgressHUD in a RubyMotion project can be found [here](https://github.com/IconoclastLabs/rm-jgprogresshud-example).

Screenshots

     

License

MIT License.
© 2014-2015, Jonas Gessner.

Credits

Created by Jonas Gessner, © 2014-2015.

jgprogresshud's People

Contributors

aporat avatar gantman avatar jonasgessner avatar krzyzanowskim avatar mallorypaine avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.