简体   繁体   中英

How can I customize the progress bar of MPMoviePlayerController's background and behavior?

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

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

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

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.

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 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM