Another problem with the animation on the layer is that it scales and appears as growing on the bottom left, somewhat similar to a shape:
---------------
| |
|---------- |
| | |
| | |
|----- | |
| | | |
---------------
I tried some animations, but could not achieve this exactly the way I want. Please suggest. Currently, the following code is used for scaling:
layer.anchorPoint = CGPointMake(1, 1);
CABasicAnimation *scale = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
[scale setFromValue:[NSNumber numberWithFloat:0.0f]];
[scale setToValue:[NSNumber numberWithFloat:1.0f]];
[scale setDuration:1.0f];
[scale setRemovedOnCompletion:NO];
[scale setFillMode:kCAFillModeForwards];
source
share