Skip to content

A very simple loader view with progress indicator and blur effect.

License

Notifications You must be signed in to change notification settings

orientemario/MOLoaderView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MOLoaderView

Version License Platform

##Preview

ExtraLight Dark

Installation

MOLoaderView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "MOLoaderView"

Requirements

This library uses POP animation engine by Facebook and UIBlurEffect available from iOS 8.0

Example Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Library Usage

Import the library

#import "MOLoaderView.h"

Initialize your loader using the blurred init

MOLoaderView *loader = [[MOLoaderView alloc] initWithRadius:100 strokeWidth:5.0
                       blurEffectStyle:0 strokeColor:[UIColor whiteColor]
                       showPercentage:YES withSymbol:YES
                       didCompleteBlock:^{
                           NSLog(@"COMPLETE!");
                       }];

Or the custom init to choose the combination of colors you like

MOLoaderView *loader = [[MOLoaderView alloc] initWithRadius:100 strokeWidth:5.0
                       backgroundCircleColor:[UIColor colorWithRed:0.435 green:0.443 blue:0.475 alpha:1.000]
                       circleColor:[UIColor colorWithRed:0.122 green:0.129 blue:0.141 alpha:1.000]
                       strokeColor:TINT_COLOR
                       showPercentage:YES withSymbol:NO
                       didCompleteBlock:^{
                            NSLog(@"COMPLETE!");
                       }];

Therefore, you can show the loader using

[loader showAtPoint:CGPointMake(self.view.center.x, self.view.frame.size.height/2) withZoomOut:NO];
[self.view addSubview:loader];

Increment the progress calling

[loader animateWithProgress:/*currentProgress*/];

And, once completed, hide it

[loader hide];

Author

Mario Oriente, oriente.mario@gmail.com

License

MOLoaderView is available under the MIT license. See the LICENSE file for more info.

About

A very simple loader view with progress indicator and blur effect.

Resources

License

Stars

Watchers

Forks

Packages

No packages published