Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CABasicAnimation *positionAnimation = [CABasicAnimation animationWithKeyPath:@"position.x"];
- positionAnimation.toValue = [NSNumber numberWithFloat: self.backgroundImageView.layer.position.x - 50.0];
- CABasicAnimation *widthAnimation = [CABasicAnimation animationWithKeyPath:@"bounds.size.width"];
- widthAnimation.toValue = [NSNumber numberWithFloat: self.backgroundImageView.bounds.size.width + 50.0];
- CAAnimationGroup *resizeAnimationGroup = [CAAnimationGroup animation];
- resizeAnimationGroup.duration = 0.5;
- resizeAnimationGroup.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
- resizeAnimationGroup.animations = [NSArray arrayWithObjects:positionAnimation, widthAnimation, nil];
Add Comment
Please, Sign In to add comment