Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug [#13] #14

Merged
merged 3 commits into from
Apr 3, 2017
Merged
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
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