ios - 水平翻转 MPMoviePlayerController

标签 ios mpmovieplayercontroller cgaffinetransform

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

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

最佳答案

试试这个:

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 并查看它是否有效。

希望对您有所帮助!!

关于ios - 水平翻转 MPMoviePlayerController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17877749/

相关文章:

ios - UIScrollview 内容大小不会随着自动布局而增加

objective-c - 我们可以将 mpmovieplayerviewcontroller 添加为 subview 吗?

ios - 无法获得 supportedInterfaceOrientationsForWindow 以使用 Swift 1.2

ios - 多次单击按钮时无法旋转图像

iPhone 指南针显示错误的航向俯仰角 > 约 45°

ios - 在多个类中添加 touchesBegan

ios - 没有来自 Interface Builder 的 UINavigationController 的 UINavigationBar

objective-c - 当我更改 moviePlayer contentURL 时 EXC_BAD_ACCESS

ios - View 在缩小时像素化

iphone - 如何相对于屏幕 iPhone 的一侧锚定 View