The easiest and cleanest way to deal with this is to create a UIView subclass that has AVPlayerLayer as its layerClass. When doing this the AVPlayerLayer will behave just like a regular UIView layer. You can change the frame of the view instead of the layer and no implicit animations will happen.
AVPlayerLayerView.h
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
@interface AVPlayerLayerView : UIView
@property (nonatomic, readonly) AVPlayerLayer *playerLayer;
@end
AVPlayerLayerView.m
#import "AVPlayerLayerView.h"
@implementation AVPlayerLayerView
+ (Class)layerClass {
return [AVPlayerLayer class];
}
- (AVPlayerLayer *)playerLayer {
return (AVPlayerLayer *)self.layer;
}
@end
You can now do this:
playerLayerView.frame = CGRectMake(0, 0, 400, 400);
To associate the AVPlayerLayer with an AVPlayer simply do this:
playerLayerView.playerLayer.player = player;