Skip to content

ali-ehsan/GIFProgressHUD

Repository files navigation

GIFProgressHUD

GIFProgressHUD is a progress HUD with any GIF for iOS. With a single line of code you can show or hide a GIF. GIFProgressHUD also provide great customization for those who want something different from default.

ScreenShots

Drawing

Drawing

Drawing

Drawing

Drawing

Drawing

Drawing

Installation

CocoaPods (Recommended way)

  1. Add the line to your Podfile pod 'GIFProgressHUD'
  2. Run the command pod install
  3. Use #import <GIFProgressHUD.h> wherever you need to use the library

Manual Installation

  1. Download the source code
  2. Copy the classes GIFImageView, GIFProgressHUD, and UIImage+GIFImage classes to your project
  3. Use #import "GIFProgressHUD.h" wherever you need to use the library

Usage

Show HUD

Show HUD only

[GIFProgressHUD showHUDWithGIFName:@"gears" addedToView:self.view animated:YES];

Show HUD with title

[GIFProgressHUD showHUDWithGIFName:@"gears" title:@"Loading..." addedToView:self.view animated:YES];

Show HUD with title and message

[GIFProgressHUD showHUDWithGIFName:@"gears" title:@"Loading..." detailTitle:@"Please wait.\n Thanks for your patience." addedToView:self.view animated:YES];

Show custom HUD

GIFProgressHUD *hud = [GIFProgressHUD showHUDWithGIFName:@"gears" title:@"Loading..." detailTitle:@"Please wait.\n Thanks for your patience." addedToView:self.view animated:YES];
    hud.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.5];
    hud.containerColor = [UIColor colorWithRed:0.0 green:0.0 blue:1.0 alpha:0.5];
    hud.containerCornerRadius = 10;
    hud.scaleFactor = 2.0;
    hud.minimumPadding = 16;
    hud.titleColor = [UIColor redColor];
    hud.detailTitleColor = [UIColor greenColor];
    hud.titleFont = [UIFont fontWithName:@"HelveticaNeue-Bold" size:20];
    hud.detailTitleFont = [UIFont fontWithName:@"HelveticaNeue-Light" size:16];

Just a title

[GIFProgressHUD showHUDWithTitle:@"Hey!" addedToView:self.view animated:YES];

Title and message

[GIFProgressHUD showHUDWithTitle:@"Hey!" detailTitle:@"How are you?" addedToView:self.view animated:YES];

Hide HUD

Hide top HUD for a specific view

[GIFProgressHUD hideHUDForView:self.view animated:YES];

Hide all HUD for a specific view

[GIFProgressHUD hideAllHUDsForView:self.view animated:YES];

Hide specific HUD

[hud hideWithAnimation:YES];

Code Inspirations

About

GIFProgressHUD is a progress HUD with GIF for iOS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published