我有一個項目,通過MPMoviePlayerViewController播放videofile, 該過程我完成了。在MPMoviePlayerViewController,我如何添加按鈕,如conrols。如何在MPMoviePlayerViewController中添加自定義按鈕?
0
A
回答
0
MPMoviePlayerViewController就像任何其他視圖控制器。您應該能夠設置您自己的自定義視圖,然後將按鈕連接到MPMoviePlayerViewController中包含的moviePlayer
0
您是否想爲下面的代碼創建MPMovieViewController的自定義,用於創建自定義的Moviecontroller。 。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
MainScreenVCtr *tempVariable=[[MainScreenVCtr alloc] initWithNibName:(UI_USER_INTERFACE_IDIOM())[email protected]"MainScreeniPad":@"MainScreenVCtr" bundle:nil];
self.nvCtr=[[UINavigationController alloc] initWithRootViewController:tempVariable];
self.nvCtr.view.frame=CGRectMake(0, 20, self.window.frame.size.width, self.window.frame.size.height-20);
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
[self.window addSubview:self.nvCtr.view];
self.vCtr=[[CustomControllsVCtr alloc] initWithNibName:(UI_USER_INTERFACE_IDIOM())[email protected]"CustomControllsiPad":@"CustomControllsVCtr" bundle:nil];
[self.window makeKeyAndVisible];
return YES;
}
And refer the reference link and Download the source code and implementation tutorail given here.
希望本教程幫助您創建自定義MPViewcontroller。
快樂編碼
相關問題
- 1. 在acumatica中添加自定義按鈕
- 2. 如何在MPMoviePlayerViewController中添加自定義控件?
- 3. 添加自定義按鈕的UITabBarController(中間添加按鈕)
- 4. 如何在自定義單元格中添加按鈕?
- 5. 我們如何在自定義單元中添加按鈕?
- 6. 如何在Silverstripe編輯器中添加自定義按鈕?
- 7. 如何在highCharts中添加自定義導出按鈕?
- 8. 如何在自定義對象窗體中添加新按鈕
- 9. 如何在Virtuemart中添加自定義字段按鈕
- 10. 如何在UITextField中添加自定義清除按鈕?
- 11. 如何在shopify博客文章中添加自定義按鈕
- 12. jQuery datepicker添加自定義按鈕
- 13. Radgrid CommandItemSettings添加自定義按鈕
- 14. 使用AsyncDisplayKit添加自定義按鈕
- 15. 將自定義按鈕添加到SlickGrid?
- 16. 將自定義按鈕添加到Galleria
- 17. 添加按鈕自定義導航欄
- 18. iOS QuickLook添加自定義按鈕
- 19. MPMoviePlayerController添加自定義播放按鈕
- 20. 如何在ZK按鈕添加自定義圖標
- 21. 如何在ActiveAdmin顯示視圖上添加自定義按鈕?
- 22. 如何將自定義按鈕添加到氣球android-mapviewbaloons中?
- 23. 如何自定義jqGrid中的添加按鈕?
- 24. 如何將自定義按鈕添加到管理列表中?
- 25. 如何添加自定義綁定的切換按鈕動畫
- 26. 如何在UITableViewCell中自定義按鈕?
- 27. 自定義AlertDialog.Builder添加自定義按鈕事件點擊
- 28. 如何在QWidget中的固定位置添加自定義形狀按鈕
- 29. 如何添加多個自定義控件按鈕傳單js?
- 30. Android:如何添加按鈕和自定義視圖