I'm trying to make a view change size using AHEasing by WarrenM https://github.com/warrenm/AHEasing I have the point to point animation working, but the re-sizing doesn't seem to work. I'm pretty new at using AHEasing so I'm not sure what mistake I'm making.
From what I can tell the image "someImage" should be resizing from CGSizeMake(300, 500)
to CGSizeMake(100, 100)
, but the changes are completely ignored.
Any help would be greatly appreciated
Here's a simplified version of what I am trying to do:
-(void)viewDidLoad
{
UIImageView *someImage.frame = CGRectMake(0, 0, 300, 500);
[self.view addsubview:someImage];
[self animatedResize];
}
-(void)animatedResize{
currentFunction = ExponentialEaseOut;
CALayer *layer = [someImage layer];
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:10.0f] forKey:kCATransactionAnimationDuration];
CAAnimation *chase =[CAKeyframeAnimation animationWithKeyPath:@"sizeChange" function:currentFunction fromSize:CGSizeMake(300, 500) toSize:CGSizeMake(100, 100)];
[chase setDelegate:self];
[layer addAnimation:chase forKey:@"sizeChange"];
[CATransaction commit];
}