弹出 MPMoviePlayerController
正在开发一个 ipad 应用程序,我想在其中弹出所需大小的 MPMoviePlayer 控制器(比如屏幕的 3/4)。如何才能实现呢?
Am developing an ipad app in which I want to pop up the MPMoviePlayer controller in a required size(Say 3/4th of the screen). How it can be achieved?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在任意位置添加 MPMoviePlayerController 视图(它不是 UIViewController 子类,但有一个 view 属性,即 UIView)(您也可以根据需要设置其框架)
编辑:
要将其集成到 UIPopoverController 中,您可以创建 UIViewController 的子类,例如 YourVideoViewController ,它具有 MPMoviePlayerController 属性(并将 MPMoviePlayerController 视图添加到其自己的视图中),然后使用 YourVideoViewController 创建 UIPopoverController 。
编辑:
您必须使用 MPMoviePlayerController 同步
加载电影(您必须注册加载状态更改通知)或异步
API。在后一种情况下,您应该注册
MPMoviePlayerThumbnailImageRequestDidFinishNotification
通知以获取缩略图。You can add the MPMoviePlayerController view (it is not a UIViewController subclass but has a view property, which is a UIView), where ever you want (you can also set its frame as you wish)
EDIT:
To integrate it to a UIPopoverController, you can make a subclass of UIViewController, say YourVideoViewController which has a MPMoviePlayerController property (and adds the MPMoviePlayerController view to its own view), then create a UIPopoverController with YourVideoViewController.
EDIT:
You have MPMoviePlayerController synchronous
the movie must be loaded (you must register for the load state changes notifications), or asynchronous
APIs. In the latter case you should register for
MPMoviePlayerThumbnailImageRequestDidFinishNotification
notifications to get the thumbnails.