This commit is contained in:
启星
2025-08-12 14:27:12 +08:00
parent 9d18b353b1
commit 1bd5e77c45
8785 changed files with 978163 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
//
// FLImageView.m
// SoundRiver
//
// Created by ln007 on 2019/4/27.
//
#import "FLImageView.h"
#import <QuartzCore/QuartzCore.h>
@implementation FLImageView
- (void)startRotating {
if (!_rotateAnimation) {
CABasicAnimation *rotateAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotateAnimation.fromValue = [NSNumber numberWithFloat:0.0];
rotateAnimation.toValue = [NSNumber numberWithFloat:M_PI * 2]; //
rotateAnimation.duration = 20.0; // 20
rotateAnimation.repeatCount = MAXFLOAT; //使
_rotateAnimation = rotateAnimation;
rotateAnimation.removedOnCompletion = NO;
}
[self.layer addAnimation:_rotateAnimation forKey:nil];
}
- (void)stopRotating {
[self.layer removeAllAnimations];
}
@end