Modern and extensive Apple-style progress HUD for iOS.
The ultimate progress HUD for iOS has arrived: JGProgressHUD!
• Well designed, easy to use.
• Feature-rich.
• Extensible and customizable (custom animations, indicator views and more).
• Uses the newest features of iOS: Blurred HUD (iOS 8+), parallax effect (iOS 7+).
• Backward compatibility to iOS 6.
• Well documented and maintained.
• Detects and repositions when keyboard appears/disappears.
• Voice Over/UIAccessibility
support.
• And most importantly, it looks good!
Check out the Examples project to see multiple uses and some of the awesome features of JGProgressHUD in action!
JGProgressHUD can be displayed in 3 styles:
• Extra Light
• Light
• Dark
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!
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.
• Base SDK of iOS 8 or higher.
• Deployment target of iOS 6.0 or higher.
• ARC.
• JGProgressHUD can also be used by projects written in Swift. See Installation for details.
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.
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.
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];
JGProgressHUD *HUD = [JGProgressHUD progressHUDWithStyle:JGProgressHUDStyleDark];
HUD.indicatorView = [[JGProgressHUDImageIndicatorView alloc] initWithImage:[UIImage imageNamed:@"my_image.png"]];
[HUD showInView:self.view];
[HUD dismissAfterDelay:3.0];
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.
CocoaPods:
In your Podfile
add:
pod 'JGProgressHUD'
Carthage:
In your Cartfile
add:
github "JonasGessner/JGProgressHUD" >= 1.3.1
Framework:
- Drag the
JGProgressHUD.xcodeproj
file into your Xcode project. - Add
JGProgressHUD.framework
to "Embedded Binaries" in the "General" tab of your project's target. - Add the
-ObjC
flag to "Other Linker Flags" in the "Build Settings" tab of your project's target.
After including JGProgressHUD as framework simply import JGProgressHUD.h
:
#import <JGProgressHUD/JGProgressHUD.h>
Swift projects need to import JGProgressHUD.h
in the Objective-C bridging header.
MIT License.
© 2014-2017, Jonas Gessner.
Created and maintained by Jonas Gessner, © 2014-2017.