I've found this code snippet:
[self setValue:direction forKey:@"currentDirection"];
CAKeyframeAnimation * animation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
animation.path = path;
animation.duration = grids * gridWidth / [self speed];
animation.fillMode = kCAFillModeForwards;
animation.removedOnCompletion = NO;
animation.delegate = self;
animation.calculationMode = kCAAnimationLinear;
[self addAnimation:animation forKey:@"movement"];
self.position = destination;
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:_turn_duration]
forKey:kCATransactionAnimationDuration];
eyes.position = eyeDestination;
pupils.position = pupilDestination;
[CATransaction commit];
CGPathRelease(path);
What's the point of using the CATransaction here?