Code Monkey home page Code Monkey logo

gmdcircleloader's Introduction

GMDCircleLoader

GMDCircleLoader is a neat and easy to use loading view meant to replicate Apple’s progress loading view of an ongoing task.

GMDCircleLoader

Installation

  • Drag the GMDCircleLoader/GMDCircleLoader folder into your project.
  • Add the QuartzCore framework to your project.
  • Update the definitions on your Header file if necessary.
  • #import “GMDCircleLoader.h” on your implementation file or add it to your projects prefix file.

Usage

(see sample Xcode project)

Use GMDCircleLoader wisely! Bad use case examples: pull to refresh, infinite scrolling, sending message.

Using GMDCircleLoader in your app will usually look as simple as this:

- (void)loginTwitter:(id)sender {
[GMDCircleLoader setOnView:self.view withTitle:@"Loading..." animated:YES];
[[Twitter sharedInstance] loginWithCompletion:^(TWTRSession *session, NSError *error) {
    if (session) {
        [GMDCircleLoading hideHUDFromView:self.view animated:YES];
                }
}

Showing the loading view

You can show the status of indeterminate tasks using one of the following:

+ (GMDCircleLoader *)setOnView:(UIView *)view withTitle:(NSString *)title animated:(BOOL)animated;

Dismissing the loading view

It can be dismissed right away using:

+ (BOOL)hideFromView:(UIView *)view animated:(BOOL)animated;

Alternate views

You can include an image to show in the middle of the loading circle by simply uncommenting:

        UIImageView *img = [[UIImageView alloc] initWithFrame:GMD_SPINNER_IMAGE];
        img.image = GMD_IMAGE;
        hud.center = img.center;
        [hud addSubview:img];

Updates pending

  • Create singleton
  • Create additional status options, including no label loader.
  • Reduce view frame from bounds to something more manageable.

Contributing to this project

If you have feature requests or bug reports, feel free to help out by sending pull requests or by creating new issues.

Please take a moment to review the guidelines written by Nicolas Gallagher:

Credits

GMDCircleLoader is brought to you by Gabe Morales and contributors to the project.

If you're using GMDCircleLoader in your project, attribution would be nice.

License

GMDCircleLoader is released under MIT License.

gmdcircleloader's People

Contributors

gabemdev avatar jeffreyjackson avatar

Watchers

 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.