self.rotateButton.imageView.alpha = 0.2;
[UIView animateWithDuration:0.2
animations:^{
self.rotateButton.imageView.alpha = 0.5;
}completion:^(BOOL finish){
[UIView animateWithDuration:0.2
animations:^{
self.rotateButton.imageView.alpha = 0.7;
}completion:^(BOOL finish){
self.rotateButton.imageView.alpha = 1.0;
}];
}];
}
[UIView animateWithDuration: 0.15 delay: 0 options: UIViewAnimationOptionCurveEaseInOut animations: ^{
[self rotateLocation:pLocation];
self.rotateButton.imageView.alpha = 0.5;
} completion: ^(BOOL finished) {
[UIView animateWithDuration: 0.15 animations: ^{
self.rotateButton.imageView.alpha = 1.0;
}];
}];
本文介绍了一个使用UIView动画实现的旋转按钮动画效果。通过逐步改变按钮透明度,创建了一个平滑过渡的视觉效果。
1万+

被折叠的 条评论
为什么被折叠?



