2010-08-28 69 views
0

控制我想用一個MPMoviePlayerViewController設置爲控制方式:MPMoviePlayerViewController設置爲MPMovieControlStyleNone

MPMovieControlStyleNone

現在我需要的方式爲最終用戶,如果他們不收這個MPMoviePlayerViewController窗口想要觀看整個視頻。我想讓他們雙擊屏幕並關閉MPMoviePlayerViewController。

有關如何做到這一點的任何建議?

謝謝你的幫助!

回答

0

嘗試把一個透明的按鈕在MPMoviePlayerViewController視圖,並使用該動作即可關閉播放器:

- (void) buttonWasPressed 
{ 
    // Close the MPMoviePlayerViewController here 
} 
+0

謝謝你的回覆。我遇到的問題是將透明按鈕放在MPMoviePlayerViewController視圖上。會有人有一些示例代碼?再次感謝。 – stopmotion24 2010-10-04 20:55:03

+0

嘗試:[yourMPMoviePlayerVC.view addSubview:theButton.view]; [yourMPMoviePlayerVC.view bringSubviewToFront:theButton.view]; – MathieuF 2010-10-05 09:18:29

0

創建一個容器視圖。將movieplayer視圖放在該視圖中,然後將按鈕放在該視圖上。我正在爲一個帶有按鈕的前奏電影執行此操作,以跳過介紹並且工作正常。