I have a UIView which contains an AVPlayer to show a video. When changing orientation, I need to change the size and location of the video.
UIView
AVPlayer
You can change the layer's frame by overriding the -layoutSubviews method:
-layoutSubviews
- (void)layoutSubviews { [super layoutSubviews]; self.playerLayer.frame = self.bounds; }