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.
- Add the line to your Podfile
pod 'GIFProgressHUD'
- Run the command
pod install
- Use
#import <GIFProgressHUD.h>
wherever you need to use the library
- Download the source code
- Copy the classes
GIFImageView
,GIFProgressHUD
, andUIImage+GIFImage
classes to your project - Use
#import "GIFProgressHUD.h"
wherever you need to use the library
[GIFProgressHUD showHUDWithGIFName:@"gears" addedToView:self.view animated:YES];
[GIFProgressHUD showHUDWithGIFName:@"gears" title:@"Loading..." addedToView:self.view animated:YES];
[GIFProgressHUD showHUDWithGIFName:@"gears" title:@"Loading..." detailTitle:@"Please wait.\n Thanks for your patience." addedToView:self.view animated:YES];
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];
[GIFProgressHUD showHUDWithTitle:@"Hey!" addedToView:self.view animated:YES];
[GIFProgressHUD showHUDWithTitle:@"Hey!" detailTitle:@"How are you?" addedToView:self.view animated:YES];
[GIFProgressHUD hideHUDForView:self.view animated:YES];
[GIFProgressHUD hideAllHUDsForView:self.view animated:YES];
[hud hideWithAnimation:YES];
- MBProgressHUD (https://github.com/jdg/MBProgressHUD)
- uiimage-from-animated-gif (https://github.com/mayoff/uiimage-from-animated-gif)