MPMoviePlayerController

MPMoviePlayerController

本文介绍了MPMoviePlayerController与MPMoviePlayerViewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iPhone开发的新手。只是想知道MPMoviePlayerController和MPMoviePlayerViewController之间的区别。另外,更一般地说,控制器和视图控制器之间有什么区别?我知道您使用控制器构建视图(与MPMoviePlayerController.view一样),那么ViewController创建的是什么?

I'm new to iPhone development. Just wondering what the difference is between the MPMoviePlayerController and the MPMoviePlayerViewController. Also, more generally, what is the difference between a controller and a view controller? I know that you use a controller to construct a view (as with MPMoviePlayerController.view), so what does a ViewController create?

推荐答案

MPMoviePlayerController只是一个电影播放器​​,它提供了一种在iPhone上播放电影的方式,MPMoviePlayerViewController是一个实际的视图控制器子类,负责MPMoviePlayerController的演示......作为将它放入
一个MPMoviePlayerController实例,或电影播放器​​,管理从文件或网络流播放电影。播放以全屏模式或电影播放器​​提供的自定义视图进行。您可以将视图合并到您自己的视图层次结构中或使用MPMoviePlayerViewController对象来管理presentat对于你来说。

The MPMoviePlayerController is just a movie player, it provides a way for you to play movies on the iPhone, a MPMoviePlayerViewController is an actual view controller subclass that takes care of presentation of the MPMoviePlayerController...as documentation at apple puts it"An MPMoviePlayerController instance, or movie player, manages the playback of a movie from a file or a network stream. Playback occurs either in full-screen mode or in a custom view that is vended by the movie player. You can incorporate the view into your own view hierarchies or use an MPMoviePlayerViewController object to manage the presentation for you."

viewControler与控制器之间没有任何关系,这个类恰好被命名为MPMoviePlayerController,因为它让你可以控制电影播放器​​。实际上之前(4.0我认为)没有视图控制器和电影播放器​​,后来苹果也决定合并电影播放器​​视图控制器。

There is no relation between a viewControler and a controller, this class just happens to be named MPMoviePlayerController because it gives you control over the movie player. Actually before (4.0 i think) there was no view controller and just the movie player, later apple decided to incorporate the movie player view controller too.

这篇关于MPMoviePlayerController与MPMoviePlayerViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 14:42