1.1.15
This commit is contained in:
@@ -42,6 +42,8 @@
|
||||
@property (nonatomic,strong) VAPView *micMp4View;
|
||||
|
||||
@property (nonatomic,strong)UIButton *headerBtn;
|
||||
|
||||
@property (nonatomic,assign)BOOL isCycleAnimation;
|
||||
@end
|
||||
|
||||
@implementation QXRoomSeatContentView
|
||||
@@ -530,6 +532,39 @@
|
||||
|
||||
}
|
||||
|
||||
-(void)startCycleAnimation{
|
||||
if (self.isCycleAnimation == YES) {
|
||||
return;
|
||||
}
|
||||
CABasicAnimation* rotationAnimation;
|
||||
|
||||
//绕哪个轴,那么就改成什么:这里是绕y轴 ---> transform.rotation.y
|
||||
|
||||
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
|
||||
|
||||
//旋转角度
|
||||
|
||||
rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI];
|
||||
|
||||
//每次旋转的时间(单位秒)
|
||||
|
||||
rotationAnimation.duration = 2;
|
||||
|
||||
rotationAnimation.cumulative = YES;
|
||||
rotationAnimation.removedOnCompletion = NO;
|
||||
|
||||
//重复旋转的次数,如果你想要无数次,那么设置成MAXFLOAT
|
||||
|
||||
rotationAnimation.repeatCount = MAXFLOAT;
|
||||
|
||||
[self.headerView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
|
||||
}
|
||||
|
||||
-(void)stopCycleAnimation{
|
||||
self.isCycleAnimation = NO;
|
||||
[self.headerView.layer removeAllAnimations];
|
||||
}
|
||||
|
||||
-(void)setNumberString:(NSString *)numberString{
|
||||
self.numberLabel.text = numberString;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user