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

时光怂恿深爱的人放手 提交于 2019-12-21 05:46:13

问题


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?


回答1:


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.

来源:https://stackoverflow.com/questions/6197062/how-can-i-customize-the-progress-bar-of-mpmovieplayercontrollers-background-and

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!