- I have a
UIScrollView *myScrollView
which has aUIView *videoView
that contains aAVPlayerLayer *playerLayer
(Actually aPBJVideoView
if anyone is familiar). - The AVPlayerLayer is set to
AVLayerVideoGravityResizeAspect
. - myScrollView's delegate's
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
returnsvideoView
.
So if I am looking at a landscape video on a portrait oriented iPhone, it fits the video so that the width matches the iPhone and there is black at the top and bottom.
As the zoomScale
goes above 1.0 the video seems biased towards the right side. Like the anchorPoint
is maybe (0.75,0.5)
- even though it is (0.5,0.5)
. In other words it zooms into a point to the right of center. (Changing the anchor point doesn't seem to affect anything)
Is there something with the AVPlayerLayer
that is causing this issue? I don't have the same problem with a UIImageView
?