Skip to content

Commit

Permalink
Merge pull request #14 from devSC/feature-dev
Browse files Browse the repository at this point in the history
Fix bug [#13]
  • Loading branch information
devSC committed Apr 3, 2017
2 parents d7c2ed1 + d605f67 commit f88e376
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 28 deletions.
29 changes: 16 additions & 13 deletions Demo/WSProgressHUD/WSProgressHUD.m
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ - (void)showHudViewWithAnimation
delay:0
options:UIViewAnimationOptionAllowUserInteraction | UIViewAnimationCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState
animations:^{
self.hudView.transform = CGAffineTransformScale(self.hudView.transform, 1/1.2, 1/1.2);
self.hudView.transform = CGAffineTransformIdentity;
self.hudView.alpha = 1;
}
completion:^(BOOL finished){
Expand Down Expand Up @@ -467,24 +467,27 @@ - (void)dismiss
self.hudView.transform = CGAffineTransformIdentity;
[UIView animateWithDuration:WSProgressHUDDismissDuration
delay:0
options:UIViewAnimationOptionAllowUserInteraction | UIViewAnimationCurveEaseOut
options:UIViewAnimationOptionAllowUserInteraction | UIViewAnimationCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState
animations:^{
self.hudView.transform = CGAffineTransformScale(self.hudView.transform, .8, .8);
self.hudView.alpha = 0;
}
completion:^(BOOL finished){
self.hudView.transform = CGAffineTransformIdentity;

[self.overlayView removeFromSuperview];

self.userInteractionEnabled = NO;

[self stopIndicatorAnimation];

//Call drawInRact
[self setNeedsDisplay];

[self setProgressHUDIndicatorStyle:self.indicatorStyle];
if (self.hudView.alpha == 0) {
self.hudView.transform = CGAffineTransformIdentity;

[self.overlayView removeFromSuperview];

self.userInteractionEnabled = NO;

[self stopIndicatorAnimation];

//Call drawInRact
[self setNeedsDisplay];

[self setProgressHUDIndicatorStyle:self.indicatorStyle];
}
}];
}

Expand Down
4 changes: 2 additions & 2 deletions WSProgressHUD.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "WSProgressHUD"
s.version = "1.1.1"
s.version = "1.1.2"
s.summary = "WSProgressHUD is a beauful hud view for iPhone & iPad."

s.description = <<-DESC
Expand All @@ -34,7 +34,7 @@ Pod::Spec.new do |s|

s.author = { "袁仕崇" => "xiaochong2154@163.com" }
s.platform = :ios, "6.0"
s.source = { :git => "https://github.com/devSC/WSProgressHUD.git", :tag => "1.1.1" }
s.source = { :git => "https://github.com/devSC/WSProgressHUD.git", :tag => "1.1.2" }
s.source_files = "WSProgressHUD/*"
s.exclude_files = "Demo/Exclude"

Expand Down
2 changes: 2 additions & 0 deletions WSProgressHUD/MMMaterialDesignSpinner.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ - (instancetype)initWithCoder:(NSCoder *)aDecoder {

- (void)awakeFromNib
{
[super awakeFromNib];

[self initialize];
}

Expand Down
Binary file modified WSProgressHUD/WSProgressBundle.bundle/error@2x.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified WSProgressHUD/WSProgressBundle.bundle/success@2x.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 16 additions & 13 deletions WSProgressHUD/WSProgressHUD.m
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ - (void)showHudViewWithAnimation
delay:0
options:UIViewAnimationOptionAllowUserInteraction | UIViewAnimationCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState
animations:^{
self.hudView.transform = CGAffineTransformScale(self.hudView.transform, 1/1.2, 1/1.2);
self.hudView.transform = CGAffineTransformIdentity;
self.hudView.alpha = 1;
}
completion:^(BOOL finished){
Expand Down Expand Up @@ -467,24 +467,27 @@ - (void)dismiss
self.hudView.transform = CGAffineTransformIdentity;
[UIView animateWithDuration:WSProgressHUDDismissDuration
delay:0
options:UIViewAnimationOptionAllowUserInteraction | UIViewAnimationCurveEaseOut
options:UIViewAnimationOptionAllowUserInteraction | UIViewAnimationCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState
animations:^{
self.hudView.transform = CGAffineTransformScale(self.hudView.transform, .8, .8);
self.hudView.alpha = 0;
}
completion:^(BOOL finished){
self.hudView.transform = CGAffineTransformIdentity;

[self.overlayView removeFromSuperview];

self.userInteractionEnabled = NO;

[self stopIndicatorAnimation];

//Call drawInRact
[self setNeedsDisplay];

[self setProgressHUDIndicatorStyle:self.indicatorStyle];
if (self.hudView.alpha == 0) {
self.hudView.transform = CGAffineTransformIdentity;

[self.overlayView removeFromSuperview];

self.userInteractionEnabled = NO;

[self stopIndicatorAnimation];

//Call drawInRact
[self setNeedsDisplay];

[self setProgressHUDIndicatorStyle:self.indicatorStyle];
}
}];
}

Expand Down

0 comments on commit f88e376

Please sign in to comment.