AVPlayerLayer animates frame changes

This is what I used:

AVPlayerLayer * playerLayer = <# AVPlayerLayer #>;
playerLayer.frame = <# CGRect #>;
[playerLayer removeAllAnimations];

I hope this helps. I don't know if its best practices, but it works for me. It seems that whenever ".frame" or "setFrame" is used, it adds animation to the layer.


You can try disabling implicit actions and using zero length animations:

CALayer *videolayer = <# AVPlayerLayer #>
[CATransaction begin];
[CATransaction setAnimationDuration:0];
[CATransaction setDisableActions:YES];
CGRect rect = videolayer.bounds;
rect.size.width /= 3;
rect.size.height /= 3;
videolayer.bounds = rect; 
[CATransaction commit];