在我的应用中,使用MPMoviePlayerViewController
,电影在完成播放后会自动被解除。我希望控制器只在单击完成按钮时被解雇。这是我的代码:
NSURL *movieURL = [NSURL URLWithString:self.postInfo.referenceText];
UIGraphicsBeginImageContext(CGSizeMake(1,1));
MPMoviePlayerViewController *controller = [[[MPMoviePlayerViewController alloc] initWithContentURL:movieURL] autorelease];
UIGraphicsEndImageContext();
AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
[appDelegate.window.rootViewController presentMoviePlayerViewControllerAnimated:controller];