我有MPMoviePlayerController,我想以编程方式显示控件,例如在用户点击后或模拟用户点击后。
我怎样才能做到这一点?
谢谢。
最佳答案
以以下方式创建MPMoviePlayerController对象将为您提供视频控件的界面
yourMoviePlayerController = [MPMoviePlayerController new];
yourMoviePlayerController.controlStyle=MPMovieControlStyleEmbedded;
[yourMoviePlayerController setContentURL:[NSURL fileURLWithPath:videoPath]];
yourMoviePlayerController.backgroundView.hidden = YES;
[yourMoviePlayerController setScalingMode:MPMovieScalingModeAspectFit];
yourMoviePlayerController.shouldAutoplay=YES;
yourMoviePlayerController.movieSourceType = MPMovieSourceTypeFile;
关于objective-c - 如何显示MPMoviePlayerController控件?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/12087086/