水平翻转MPMoviePlayerController

时间:2013-07-26 09:29:11

标签: ios mpmovieplayercontroller cgaffinetransform

是否可以仅翻转MPMoviePlayerController的视频部分并使播放器的控件保持原样?当我尝试翻转视频时,它也会翻转控件。

CGAffineTransform trans = CGAffineTransformIdentity;
trans = CGAffineTransformScale(trans, -1, 1);
[MoviePlayer.view setTransform:trans];

1 个答案:

答案 0 :(得分:1)

试试这个:

UIView* Flipview = [[UIView alloc]init];
    for (UIView* view in [theMovie.view subviews]) 
    {
        Flipview=view;
        NSLog(@"%@",view);
    }



     [UIView beginAnimations:nil context:nil];
            [UIView setAnimationDuration:1.0];
            [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:Flipview cache:YES];

            [UIView commitAnimations];

使用movieplayerview更改self.view,看看它是否有效。

希望它能帮助!!