2012-02-20 80 views

回答

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。

快乐编码

相关问题