Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Example/MOLoaderView/MOViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ - (IBAction)showButton:(id)sender
}];
}

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

[self.loader show];

[self.view addSubview:self.loader];
[self performSelector:@selector(startProgress) withObject:nil afterDelay:2];
}
Expand Down
1 change: 1 addition & 0 deletions Pod/Classes/MOLoaderView.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ typedef void(^LoaderViewBlock)();
-(void)waitingAnimation;
-(void)animateWithProgress:(CGFloat)progress;
-(void)showAtPoint:(CGPoint)center withZoomOut:(BOOL)zoomOut;
-(void)showWithZoomOut:(BOOL)zoomOut; // Presents the loader inside the current application window
-(void)hide;

-(instancetype)initWithRadius:(CGFloat)r strokeWidth:(CGFloat)width backgroundCircleColor:(UIColor *)backgroundCircleColor circleColor:(UIColor *)circleColor strokeColor:(UIColor *)strokeColor showPercentage:(BOOL)showPercentage withSymbol:(BOOL)showSymbol didCompleteBlock:(LoaderViewBlock)block;
Expand Down
8 changes: 8 additions & 0 deletions Pod/Classes/MOLoaderView.m
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,14 @@ -(void)showAtPoint:(CGPoint)center withZoomOut:(BOOL)zoomOut
[self performSelector:@selector(waitingAnimation) withObject:nil afterDelay:0];
}

-(void)showWithZoomOut:(BOOL)zoomOut{

UIWindow *window = [[[UIApplication sharedApplication] delegate] window];

[window addSubview:self];
[self showAtPoint:CGPointMake(CGRectGetMidX(window.bounds), CGRectGetMidY(window.bounds)) withZoomOut:zoomOut];
}

-(void)updatePercentageLabelWithProgress:(CGFloat)progress
{
if(_percentageLabel){
Expand Down