如何自定义MPMoviePlayerController的背景和行为的进度条? [英] How can I customize the progress bar of MPMoviePlayerController's background and behavior?

查看:303
本文介绍了如何自定义MPMoviePlayerController的背景和行为的进度条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我是新的,我无法张贴图片...所以我必须绘制图片:

Since I'm new I can't post image yet... so I'll have to draw the picture:

---------------------------------------------------------------------------
|[Done]                        Loading... (*)                             |
---------------------------------------------------------------------------
|                                                                         |
|                                                                         |
|                                                                         |
|                                                                         |
|                                                                         |
|                                                                         |
|                                                                         |
|                      |--------------------------|                       |
|                      |                          |                       |
|                      |   |<<      ||      >>|   |                       |
|                      |                          |                       |
|                      |--------------------------|                       |
|                                                                         |
---------------------------------------------------------------------------

我的目标是创建一个自定义的MPMoviePlayerController看起来像上面。

My goal is to create a customized MPMoviePlayerController looks like above.

状态栏的背景已更改,另一件事是显示完成按钮,即使播放器仍在加载电影,以便用户可以取消加载(MPMoviePlayerController的正常行为是在电影开始播放后显示完成按钮)。相信与否,(*)是活动指标。

The status bar's background has been changed, and the other thing is it shows the "Done" button even when the player is still loading the movie so that the user can cancel the loading (normal behavior of MPMoviePlayerController is to show the "Done" button after the movie starts to play). Believe it or not, the (*) is the activity indicator.

我可能错了,但我认为我在苹果的文档中读到一个不能修改MPMoviePlayerController的任何子视图,所以我想知道是否有人以前做过这样的事情吗?

I may be wrong, but I think I read somewhere in Apple's document that one can't modify any of the subviews of MPMoviePlayerController, so I'm wondering if anyone has done anything like this before?

推荐答案

Pragmatic iPad Programming 有一个使用 MPMoviePlayerController 完成的自定义视图/ viewController组合的示例。检查第8章的源代码(从该页面免费下载)。他们使用在项目中作为文件提供的视频。 Btw,如果视频中的文件在XCode中显示为红色,则必须删除它并再次添加,我认为项目定义有点纠结。

Pragmatic iPad Programming has a sample of a custom view/viewController combo done with MPMoviePlayerController. Check the source code for chapter 8 (free download from that page). They use a video provided as a file inside the project. Btw, if the file in the video appears red in XCode, you'll have to remove it and add it again, I think the project definition is a bit screwed.



不是你要的,但它会让你在正确的轨道。


Not exactly what you asked for but it will set you in the right track.

这篇关于如何自定义MPMoviePlayerController的背景和行为的进度条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆