Skip to content

Commit

Permalink
去掉 QMUIButton setHighlighted:、setEnabled: 时自带的动画效果
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLice committed Aug 29, 2018
1 parent 5daa02d commit d62feef
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions QMUIKit/QMUIComponents/QMUIButton/QMUIButton.m
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,7 @@ - (void)setHighlighted:(BOOL)highlighted {
if (highlighted) {
self.alpha = ButtonHighlightedAlpha;
} else {
[UIView animateWithDuration:0.25f animations:^{
self.alpha = 1;
}];
self.alpha = 1;
}
}
}
Expand All @@ -461,9 +459,7 @@ - (void)setEnabled:(BOOL)enabled {
if (!enabled && self.adjustsButtonWhenDisabled) {
self.alpha = ButtonDisabledAlpha;
} else {
[UIView animateWithDuration:0.25f animations:^{
self.alpha = 1;
}];
self.alpha = 1;
}
}

Expand Down

0 comments on commit d62feef

Please sign in to comment.