我有一個項目,通過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. 添加自定義按鈕
- 2. 如何在MPMoviePlayerViewController中添加自定義控件?
- 3. 在acumatica中添加自定義按鈕
- 4. 添加自定義按鈕的UITabBarController(中間添加按鈕)
- 5. 在自定義模塊magento中添加自定義按鈕
- 6. 如何在shopify博客文章中添加自定義按鈕
- 7. 如何在dojox網格中添加自定義按鈕?
- 8. 如何在自定義對象窗體中添加新按鈕
- 9. 如何在GWT dataGrid中添加自定義按鈕?
- 10. 如何在Silverstripe編輯器中添加自定義按鈕?
- 11. 如何在自定義單元格中添加按鈕?
- 12. 我們如何在自定義單元中添加按鈕?
- 13. 如何在Virtuemart中添加自定義字段按鈕
- 14. 如何在UITextField中添加自定義清除按鈕?
- 15. 如何在highCharts中添加自定義導出按鈕?
- 16. 如何在單元格中添加自定義按鈕?
- 17. 如何在android中的自定義視圖上添加按鈕?
- 18. 將自定義按鈕添加到SlickGrid?
- 19. Radgrid CommandItemSettings添加自定義按鈕
- 20. 添加按鈕自定義導航欄
- 21. 向按鈕添加自定義功能
- 22. jQuery datepicker添加自定義按鈕
- 23. MPMoviePlayerController添加自定義播放按鈕
- 24. iOS QuickLook添加自定義按鈕
- 25. 使用AsyncDisplayKit添加自定義按鈕
- 26. 添加自定義可點擊按鈕
- 27. OpenLayers添加自定義按鈕
- 28. 將自定義按鈕添加到Galleria
- 29. 如何自定義jqGrid中的添加按鈕?
- 30. 如何將自定義按鈕添加到氣球android-mapviewbaloons中?