Giter VIP home page Giter VIP logo

gifprogresshud's Introduction

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

gifprogresshud's People

Contributors

ali-ehsan avatar

Watchers

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