It seems that the second transform calculate the position still based on the original position.
- (void) animateLogo{
//Move the logo to center
CGAffineTransform transformTranslate = CGAffineTransformMakeTranslation(0, 53.0);
CGAffineTransform transformScale = CGAffineTransformMakeScale(1.35, 1.35);
CGAffineTransform transformClock = CGAffineTransformConcat(transformScale, transformTranslate);
[self.logoImageView setTransform:transformClock];
[UIView animateWithDuration:1.0
delay: 0.0
options: UIViewAnimationOptionCurveEaseIn
animations:^{
//Move logo back to the original position.
CGAffineTransform transformTranslate2 = CGAffineTransformMakeTranslation(0, 0);
CGAffineTransform transformScale2 = CGAffineTransformMakeScale(1, 1);
CGAffineTransform transformClock2 = CGAffineTransformConcat(transformScale2, transformTranslate2);
[self.logoImageView setTransform:transformClock2];
}
completion: ^(BOOL finish){
}];
}
没有评论:
发表评论