Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // AnimatedLogoView.m
- // GetMeet
- //
- // Created by Igor Starzhinskiy on 09.09.16.
- // Copyright © 2016 alex. All rights reserved.
- //
- #import "AnimatedLogoView.h"
- @interface AnimatedLogoView ()
- enum AnimationLogoType {
- ANone,
- AStart,
- AHalfStart,
- ABack,
- AActivity
- };
- @property (strong, nonatomic) UIImageView *logoCompleteView;
- @property (strong, nonatomic) UIImageView *logoLeftUpView;
- @property (strong, nonatomic) UIImageView *logoRightUpView;
- @property (strong, nonatomic) UIImageView *logoRigthDownView;
- @property (strong, nonatomic) UIImageView *logoLeftDownView;
- @property (strong, nonatomic) UIView *circleView;
- @property (strong, nonatomic) UIImageView *logoMView;
- @property (strong, nonatomic) UIImageView *logoGetView;
- @property (strong, nonatomic) UIImageView *logoEetView;
- //@property (assign, nonatomic) BOOL isAnimating;
- //@property (assign, nonatomic) BOOL isBackAnimation;
- //@property (assign, nonatomic) BOOL isHalfStartAnimation;
- @property (assign, nonatomic) enum AnimationLogoType animationType;
- @property (assign, nonatomic) BOOL stopAction;
- @property (assign, nonatomic) BOOL animateBackWhenStopped;
- @property (assign, nonatomic) BOOL animateStartWhenStopped;
- @end
- @implementation AnimatedLogoView
- #pragma mark - Inits
- - (void)setup {
- self.backgroundColor = [UIColor clearColor];
- CGPoint center = self.center;
- //self.isAnimating = NO;
- _animationType = ANone;
- self.logoCompleteView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"GetMeet_logo_auth"]];
- self.bounds = self.logoCompleteView.bounds;
- self.center = center;
- self.logoLeftUpView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"logo_left_up"]];
- self.logoRightUpView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"logo_right_up"]];
- self.logoRigthDownView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"logo_right_down"]];
- self.logoLeftDownView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"logo_left_down"]];
- self.circleView = [[UIView alloc] initWithFrame:self.logoLeftUpView.frame];
- self.circleView.center = CGPointMake(self.bounds.size.width / 2.f, self.bounds.size.height / 2.f);
- self.circleView.backgroundColor = [UIColor clearColor];
- self.circleView.hidden = NO;
- self.logoMView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"logo_m"]];
- self.logoGetView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"logo_get"]];
- self.logoEetView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"logo_eet"]];
- self.logoCompleteView.hidden = YES;
- self.logoLeftUpView.hidden = YES;
- self.logoRightUpView.hidden = YES;
- self.logoRigthDownView.hidden = YES;
- self.logoLeftDownView.hidden = YES;
- self.logoMView.hidden = YES;
- self.logoGetView.hidden = YES;
- self.logoEetView.hidden = YES;
- [self addSubview:self.logoCompleteView];
- [self.circleView addSubview:self.logoLeftUpView];
- [self.circleView addSubview:self.logoRightUpView];
- [self.circleView addSubview:self.logoRigthDownView];
- [self.circleView addSubview:self.logoLeftDownView];
- [self addSubview:self.circleView];
- [self addSubview:self.logoMView];
- [self addSubview:self.logoGetView];
- [self addSubview:self.logoEetView];
- }
- - (instancetype)initWithCoder:(NSCoder *)coder
- {
- self = [super initWithCoder:coder];
- if (self) {
- [self setup];
- }
- return self;
- }
- - (instancetype)initWithFrame:(CGRect)frame {
- self = [super initWithFrame:frame];
- if (self) {
- [self setup];
- }
- return self;
- }
- /*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect {
- // Drawing code
- }
- */
- #pragma mark - Public methods
- - (void)startAnimation {
- if (_animationType != ANone) {
- if (_animationType == ABack) {
- self.animateStartWhenStopped = YES;
- }
- return;
- }
- //self.isAnimating = YES;
- //self.isBackAnimation = NO;
- _animationType = AStart;
- self.logoCompleteView.hidden = YES;
- self.logoLeftUpView.hidden = YES;
- self.logoRightUpView.hidden = YES;
- self.logoRigthDownView.hidden = YES;
- self.logoLeftDownView.hidden = YES;
- self.logoMView.hidden = YES;
- self.logoGetView.hidden = YES;
- self.logoEetView.hidden = YES;
- [self performSelector:@selector(animateStage1) withObject:nil afterDelay:0.1f];
- [self performSelector:@selector(animateStage2) withObject:nil afterDelay:0.3f];
- [self performSelector:@selector(animateStage5) withObject:nil afterDelay:0.4f]; //start rotating left
- [self performSelector:@selector(animateStage3) withObject:nil afterDelay:0.5f];
- [self performSelector:@selector(animateStage4) withObject:nil afterDelay:0.7f];
- }
- - (void)backAnimation {
- if (_animationType != ANone) {
- if (_animationType == AStart || _animationType == AHalfStart) {
- self.animateBackWhenStopped = YES;
- }
- return;
- }
- //self.isAnimating = YES;
- //self.isBackAnimation = YES;
- _animationType = ABack;
- self.logoCompleteView.hidden = YES;
- self.logoLeftUpView.hidden = NO;
- self.logoRightUpView.hidden = NO;
- self.logoRigthDownView.hidden = NO;
- self.logoLeftDownView.hidden = NO;
- self.logoMView.hidden = NO;
- self.logoGetView.hidden = NO;
- self.logoEetView.hidden = NO;
- [self performSelector:@selector(backAnimateGet) withObject:nil afterDelay:0.05f];
- [self performSelector:@selector(backAnimateRotate) withObject:nil afterDelay:0.2f];
- [self performSelector:@selector(backAnimateEet) withObject:nil afterDelay:0.15f];
- }
- - (void)halfStartAnimation {
- if (_animationType == AStart || _animationType == AHalfStart || _animationType == AActivity) {
- self.animateBackWhenStopped = NO;
- return;
- }
- _animationType = AHalfStart;
- BOOL animateBackBefore = NO;
- if (!self.logoCompleteView.hidden || !self.logoGetView.hidden || !self.logoEetView.hidden) {
- self.logoCompleteView.hidden = YES;
- animateBackBefore = YES;
- self.logoGetView.hidden = NO;
- self.logoEetView.hidden = NO;
- }
- self.logoLeftUpView.hidden = NO;
- self.logoRightUpView.hidden = NO;
- self.logoRigthDownView.hidden = NO;
- self.logoLeftDownView.hidden = NO;
- self.logoMView.hidden = NO;
- if (animateBackBefore) {
- [self performSelector:@selector(backAnimateGet) withObject:nil afterDelay:0.05f];
- [self performSelector:@selector(backAnimateEet) withObject:nil afterDelay:0.15f];
- [self performSelector:@selector(backAnimateRotate) withObject:nil afterDelay:0.2f];
- } else {
- [self performSelector:@selector(backAnimateRotate) withObject:nil afterDelay:0.1f];
- }
- }
- - (void)stopAnimation {
- self.stopAction = YES;
- }
- - (void)startActivityIndication {
- _animationType = AActivity;
- self.logoCompleteView.hidden = YES;
- self.logoLeftUpView.hidden = NO;
- self.logoRightUpView.hidden = NO;
- self.logoRigthDownView.hidden = NO;
- self.logoLeftDownView.hidden = NO;
- self.logoMView.hidden = NO;
- self.logoGetView.hidden = NO;
- self.logoEetView.hidden = NO;
- [self performSelector:@selector(backAnimateGet) withObject:nil afterDelay:0.05f];
- [self performSelector:@selector(backAnimateRotate) withObject:nil afterDelay:0.2f];
- [self performSelector:@selector(backAnimateEet) withObject:nil afterDelay:0.15f];
- }
- - (void)stopActivityIndication {
- _animationType = ABack;
- }
- #pragma mark - Animation stages
- - (void)animateStage1 {
- CGFloat width = self.logoLeftUpView.bounds.size.width;
- CGFloat height = self.logoLeftUpView.bounds.size.height;
- CGPoint center = CGPointMake(self.circleView.bounds.size.width / 2.f, self.circleView.bounds.size.height / 2.f);
- self.logoLeftUpView.bounds = CGRectMake(0.f, 0.f, width * 0.3f, height * 0.3f);
- self.logoLeftUpView.center = center;
- self.logoLeftUpView.alpha = 0.5f;
- self.logoLeftUpView.hidden = NO;
- [UIView animateWithDuration:0.5f
- delay:0.f
- usingSpringWithDamping:0.4f
- initialSpringVelocity:0.8f
- options:UIViewAnimationOptionCurveEaseOut
- animations:^{
- self.logoLeftUpView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoLeftUpView.center = center;
- self.logoLeftUpView.alpha = 1.0f;
- }
- completion:^(BOOL finished) {
- //[self animateStage5];
- }];
- }
- - (void)animateStage2 {
- CGFloat width = self.logoRightUpView.bounds.size.width;
- CGFloat height = self.logoRightUpView.bounds.size.height;
- CGPoint center = CGPointMake(self.circleView.bounds.size.width / 2.f, self.circleView.bounds.size.height / 2.f);
- self.logoRightUpView.bounds = CGRectMake(0.f, 0.f, width * 0.3f, height * 0.3f);
- self.logoRightUpView.center = center;
- self.logoRightUpView.alpha = 0.5f;
- self.logoRightUpView.hidden = NO;
- [UIView animateWithDuration:0.5f
- delay:0.f
- usingSpringWithDamping:0.4f
- initialSpringVelocity:0.8f
- options:UIViewAnimationOptionCurveEaseOut
- animations:^{
- self.logoRightUpView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoRightUpView.center = center;
- self.logoRightUpView.alpha = 1.0f;
- }
- completion:^(BOOL finished) {
- }];
- }
- - (void)animateStage3 {
- CGFloat width = self.logoRigthDownView.bounds.size.width;
- CGFloat height = self.logoRigthDownView.bounds.size.height;
- CGPoint center = CGPointMake(self.circleView.bounds.size.width / 2.f, self.circleView.bounds.size.height / 2.f);
- self.logoRigthDownView.bounds = CGRectMake(0.f, 0.f, width * 0.3f, height * 0.3f);
- self.logoRigthDownView.center = center;
- self.logoRigthDownView.alpha = 0.5f;
- self.logoRigthDownView.hidden = NO;
- [UIView animateWithDuration:0.5f
- delay:0.f
- usingSpringWithDamping:0.4f
- initialSpringVelocity:0.8f
- options:UIViewAnimationOptionCurveEaseOut
- animations:^{
- self.logoRigthDownView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoRigthDownView.center = center;
- self.logoRigthDownView.alpha = 1.0f;
- }
- completion:^(BOOL finished) {
- }];
- }
- - (void)animateStage4 {
- CGFloat width = self.logoLeftDownView.bounds.size.width;
- CGFloat height = self.logoLeftDownView.bounds.size.height;
- CGPoint center = CGPointMake(self.circleView.bounds.size.width / 2.f, self.circleView.bounds.size.height / 2.f);
- self.logoLeftDownView.bounds = CGRectMake(0.f, 0.f, width * 0.3f, height * 0.3f);
- self.logoLeftDownView.center = center;
- self.logoLeftDownView.alpha = 0.5f;
- self.logoLeftDownView.hidden = NO;
- [UIView animateWithDuration:0.5f
- delay:0.f
- usingSpringWithDamping:0.4f
- initialSpringVelocity:0.8f
- options:UIViewAnimationOptionCurveEaseOut
- animations:^{
- self.logoLeftDownView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoLeftDownView.center = center;
- self.logoLeftDownView.alpha = 1.0f;
- }
- completion:^(BOOL finished) {
- }];
- }
- /*
- - (void)runSpinAnimationOnView:(UIView*)view duration:(CGFloat)duration rotations:(CGFloat)rotations repeat:(float)repeat;
- {
- CABasicAnimation* rotationAnimation;
- rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
- rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI * 2.0 * rotations * duration ];
- rotationAnimation.duration = duration;
- rotationAnimation.cumulative = YES;
- rotationAnimation.repeatCount = repeat;
- [view.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
- }
- - (void)rotateView:(UIView *)view
- {
- [UIView animateWithDuration:1 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
- [view setTransform:CGAffineTransformRotate(view.transform, M_PI_2)];
- }completion:^(BOOL finished) {
- if (finished) {
- [self rotateView:view];
- }
- }];
- } */
- - (void)animateStage5 {
- //rotate cicleView left on 30 degrees
- if (self.stopAction) {
- [self performSelector:@selector(stopComplete) withObject:nil afterDelay:0.3f];
- return;
- }
- [UIView animateWithDuration:0.35f
- delay:0.f
- options:UIViewAnimationOptionCurveEaseInOut
- animations:^{
- [self.circleView setTransform:CGAffineTransformRotate(self.circleView.transform, (M_PI * -45.f)/180.f)];
- }completion:^(BOOL finished) {
- if (self.stopAction) {
- [self stopComplete];
- return;
- }
- [self animateStage6];
- if (_animationType == AStart) {
- //[self animateMStage1];
- [self performSelector:@selector(animateMStage1) withObject:nil afterDelay:0.15f];
- }
- }];
- }
- - (void)animateStage6 {
- //start rotation cicleView right 390 degrees UIViewAnimationOptionCurveEaseIn
- [UIView animateWithDuration:0.35f
- delay:0.f
- options:UIViewAnimationOptionCurveEaseIn
- animations:^{
- [self.circleView setTransform:CGAffineTransformRotate(self.circleView.transform, (M_PI * 45.f)/180.f)];
- }completion:^(BOOL finished) {
- if (self.stopAction) {
- [self stopComplete];
- return;
- }
- [self animateStage7];
- //if (_animationType == AStart) {
- // [self animateMStage1];
- //}
- }];
- }
- - (void)animateStage7 {
- //middle on rotation cicleView right 390 degrees UIViewAnimationOptionCurveLinear
- [UIView animateWithDuration:0.15f
- delay:0.f
- options:UIViewAnimationOptionCurveLinear
- animations:^{
- [self.circleView setTransform:CGAffineTransformRotate(self.circleView.transform, M_PI)];
- }completion:^(BOOL finished) {
- if (self.stopAction) {
- [self stopComplete];
- return;
- }
- [self animateStage8];
- //[self animateMStage1];
- }];
- }
- - (void)animateStage8 {
- //middle on rotation cicleView right 390 degrees UIViewAnimationOptionCurveLinear
- [UIView animateWithDuration:0.15f
- delay:0.f
- options:UIViewAnimationOptionCurveLinear
- animations:^{
- [self.circleView setTransform:CGAffineTransformRotate(self.circleView.transform, M_PI)];
- }completion:^(BOOL finished) {
- if (self.stopAction) {
- [self stopComplete];
- return;
- }
- if (_animationType == AActivity) {
- [self animateStage8];
- } else {
- [self animateStage9];
- }
- }];
- }
- - (void)animateStage9 {
- //end rotation cicleView right 390 degrees UIViewAnimationOptionCurveEaseOut
- [UIView animateWithDuration:0.3f
- delay:0.f
- options:UIViewAnimationOptionCurveEaseOut
- animations:^{
- [self.circleView setTransform:CGAffineTransformRotate(self.circleView.transform, (M_PI * 45.f)/180.f)];
- }completion:^(BOOL finished) {
- if (self.stopAction) {
- [self stopComplete];
- return;
- }
- [self animateStage10];
- }];
- }
- - (void)animateStage10 {
- //rotate cicleView left on 30 degrees
- [UIView animateWithDuration:0.4f
- delay:0.f
- options:UIViewAnimationOptionCurveEaseInOut
- animations:^{
- [self.circleView setTransform:CGAffineTransformRotate(self.circleView.transform, (M_PI * -45.f)/180.f)];
- }completion:^(BOOL finished) {
- if (_animationType == ABack) {
- [self stopComplete];
- } else if (_animationType == AHalfStart) {
- [self animateGet];
- }
- }];
- }
- - (void)animateMStage1 {
- CGFloat width = self.logoMView.bounds.size.width;
- CGFloat height = self.logoMView.bounds.size.height;
- CGPoint center = CGPointMake(self.bounds.size.width / 2.f, self.bounds.size.height / 2.f);
- self.logoMView.bounds = CGRectMake(0.f, 0.f, width * 0.25f, height * 0.25f);
- self.logoMView.center = center;
- self.logoMView.alpha = 0.1f;
- self.logoMView.hidden = NO;
- [UIView animateWithDuration:0.2f
- delay:0.f
- options:UIViewAnimationOptionCurveLinear
- animations:^{
- self.logoMView.alpha = 0.5f;
- self.logoMView.bounds = CGRectMake(0.f, 0.f, width * 0.5f, height * 0.5f);
- self.logoMView.center = center;
- [self.logoMView setTransform:CGAffineTransformRotate(self.logoMView.transform, M_PI)];
- }completion:^(BOOL finished) {
- if (self.stopAction) {
- self.logoMView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoMView.center = center;
- [self stopComplete];
- return;
- }
- [UIView animateWithDuration:0.2f
- delay:0.f
- options:UIViewAnimationOptionCurveLinear
- animations:^{
- self.logoMView.alpha = 1.0f;
- self.logoMView.bounds = CGRectMake(0.f, 0.f, width * 0.75f, height * 0.75f);
- self.logoMView.center = center;
- [self.logoMView setTransform:CGAffineTransformRotate(self.logoMView.transform, M_PI)];
- }completion:^(BOOL finished) {
- if (self.stopAction) {
- self.logoMView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoMView.center = center;
- [self stopComplete];
- return;
- }
- [UIView animateWithDuration:0.25f
- delay:0.f
- options:UIViewAnimationOptionCurveLinear
- animations:^{
- self.logoMView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoMView.center = center;
- [self.logoMView setTransform:CGAffineTransformRotate(self.logoMView.transform, M_PI)];
- }completion:^(BOOL finished) {
- //[self animateMStage2];
- if (self.stopAction) {
- [self stopComplete];
- return;
- }
- [UIView animateWithDuration:0.25f
- delay:0.f
- options:UIViewAnimationOptionCurveLinear
- animations:^{
- [self.logoMView setTransform:CGAffineTransformRotate(self.logoMView.transform, M_PI)];
- }completion:^(BOOL finished) {
- if (self.stopAction) {
- [self stopComplete];
- return;
- }
- [self animateMStage2];
- }];
- }];
- }];
- }];
- }
- - (void)animateMStage2 {
- [self animateGet];
- [UIView animateWithDuration:0.20f
- delay:0.f
- options:UIViewAnimationOptionCurveEaseOut
- animations:^{
- [self.logoMView setTransform:CGAffineTransformRotate(self.logoMView.transform, (M_PI * 45.f)/180.f)];
- }completion:^(BOOL finished) {
- if (self.stopAction) {
- [self stopComplete];
- return;
- }
- [self animateMStage3];
- }];
- }
- - (void)animateMStage3 {
- [UIView animateWithDuration:0.20f
- delay:0.f
- options:UIViewAnimationOptionCurveEaseInOut
- animations:^{
- [self.logoMView setTransform:CGAffineTransformRotate(self.logoMView.transform, (M_PI * -45.f)/180.f)];
- }completion:^(BOOL finished) {
- //[self animateStage10];
- //[self performSelector:@selector(stopComplete) withObject:nil afterDelay:0.1f];
- }];
- }
- - (void)animateGet {
- [self performSelector:@selector(animateEet) withObject:nil afterDelay:0.15f];
- CGFloat width = self.logoGetView.bounds.size.width;
- CGFloat height = self.logoGetView.bounds.size.height;
- CGPoint center = CGPointMake(self.bounds.size.width / 2.f, self.bounds.size.height / 2.f);
- self.logoGetView.bounds = CGRectMake(0.f, 0.f, width * 0.25f, height * 0.25f);
- self.logoGetView.center = center;
- self.logoGetView.alpha = 0.25f;
- self.logoGetView.hidden = NO;
- [UIView animateWithDuration:0.25f
- delay:0.f
- options:UIViewAnimationOptionCurveEaseOut//UIViewAnimationOptionCurveLinear
- animations:^{
- self.logoGetView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoGetView.center = center;
- self.logoGetView.alpha = 1.f;
- }completion:^(BOOL finished) {
- }];
- }
- - (void)animateEet {
- CGFloat width = self.logoEetView.bounds.size.width;
- CGFloat height = self.logoEetView.bounds.size.height;
- CGPoint center = CGPointMake(self.bounds.size.width / 2.f, self.bounds.size.height / 2.f);
- self.logoEetView.bounds = CGRectMake(0.f, 0.f, width * 0.25f, height * 0.25f);
- self.logoEetView.center = center;
- self.logoEetView.alpha = 0.25f;
- self.logoEetView.hidden = NO;
- [UIView animateWithDuration:0.25f
- delay:0.f
- options:UIViewAnimationOptionCurveEaseOut//UIViewAnimationOptionCurveLinear
- animations:^{
- self.logoEetView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoEetView.center = center;
- self.logoEetView.alpha = 1.f;
- }completion:^(BOOL finished) {
- [self performSelector:@selector(stopComplete) withObject:nil afterDelay:0.3f];
- }];
- }
- - (void)backAnimateGet {
- CGFloat width = self.logoGetView.bounds.size.width;
- CGFloat height = self.logoGetView.bounds.size.height;
- CGPoint center = CGPointMake(self.bounds.size.width / 2.f, self.bounds.size.height / 2.f);
- self.logoGetView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoGetView.center = center;
- self.logoGetView.alpha = 1.f;
- self.logoGetView.hidden = NO;
- [UIView animateWithDuration:0.3f
- delay:0.f
- options:UIViewAnimationOptionCurveLinear
- animations:^{
- self.logoGetView.bounds = CGRectMake(0.f, 0.f, width * 0.15f, height * 0.15f);
- self.logoGetView.center = center;
- self.logoGetView.alpha = 0.1f;
- }completion:^(BOOL finished) {
- //hide and restore size
- self.logoGetView.hidden = YES;
- self.logoGetView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoGetView.center = center;
- self.logoGetView.alpha = 1.f;
- }];
- }
- - (void)backAnimateEet {
- CGFloat width = self.logoEetView.bounds.size.width;
- CGFloat height = self.logoEetView.bounds.size.height;
- CGPoint center = CGPointMake(self.bounds.size.width / 2.f, self.bounds.size.height / 2.f);
- self.logoEetView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoEetView.center = center;
- self.logoEetView.alpha = 1.f;
- self.logoEetView.hidden = NO;
- [UIView animateWithDuration:0.3f
- delay:0.f
- options:UIViewAnimationOptionCurveLinear
- animations:^{
- self.logoEetView.bounds = CGRectMake(0.f, 0.f, width * 0.15f, height * 0.15f);
- self.logoEetView.center = center;
- self.logoEetView.alpha = 0.1f;
- }completion:^(BOOL finished) {
- //hide and restore size
- self.logoEetView.hidden = YES;
- self.logoEetView.bounds = CGRectMake(0.f, 0.f, width, height);
- self.logoEetView.center = center;
- self.logoEetView.alpha = 1.f;
- }];
- }
- - (void)backAnimateRotate {
- [self animateStage5];
- }
- - (void)stopComplete {
- //self.isAnimating = NO;
- self.stopAction = NO;
- if (_animationType == AStart || _animationType == AHalfStart) {
- self.logoLeftUpView.hidden = YES;
- self.logoRightUpView.hidden = YES;
- self.logoRigthDownView.hidden = YES;
- self.logoLeftDownView.hidden = YES;
- self.logoMView.hidden = YES;
- self.logoGetView.hidden = YES;
- self.logoEetView.hidden = YES;
- self.logoCompleteView.hidden = NO;
- }
- [self.logoLeftUpView setTransform:CGAffineTransformIdentity];
- [self.logoRightUpView setTransform:CGAffineTransformIdentity];
- [self.logoRigthDownView setTransform:CGAffineTransformIdentity];
- [self.logoLeftDownView setTransform:CGAffineTransformIdentity];
- [self.logoMView setTransform:CGAffineTransformIdentity];
- _animationType = ANone;
- if (self.animateBackWhenStopped) {
- self.animateBackWhenStopped = NO;
- [self backAnimation];
- } else if (self.animateStartWhenStopped) {
- self.animateStartWhenStopped = NO;
- [self startAnimation];
- }
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement