MPMoviePlayerViewController
全部标签 我正在使用MPMoviePlayerViewController作为模态视图Controller播放视频,但注意到在应用程序暂停(按下主页按钮)时,它会自动关闭(按下主页按钮几秒钟后,beforeappresumed)并且显示了我之前的ViewController。来自anotherquestion,似乎实际上它应该正确暂停/恢复而不是解散。它对我来说表现不同的原因可能是什么(iOS6.1.3、iPhone4)? 最佳答案 你可能一直在使用ARC,在.m文件中声明了MPMoviePlayerController对象,在.h文件中声明
我正在开发一个应用程序,我想为iPhone3.0、iPhone4.0部署它并且可以在iPad上以模拟模式运行。我正在使用XCode3.2.3进行开发,并且有视频要播放。我想将MPMoviePlayerViewController用于>=3.2,将MPMoviePlayerController用于如果我用ClassmplayerControllerClass=NSClassFromString(@"MPMoviePlayerViewController");if(mplayerControllerClass!=nil){MPMoviePlayerViewController*movieP
我正在向我的应用添加一个MPMoviePlayerViewController,如下所示:MPMoviePlayerViewController*vc=[[MPMoviePlayerViewControlleralloc]initWithContentURL:movieURL];;[selfpresentMoviePlayerViewControllerAnimated:vc];一切正常,但我无法启用横向模式。除了实际的MPMoviePlayerViewController之外,我希望我的整个应用程序都是纵向的。我在谷歌上搜索,但所有解决方案都要求应用程序的其余部分也处于横向状态。我需
在使用MPMoviePlayerViewController时,我收到如下错误通知和应用程序崩溃。_serverConnectionDiedNotification.Info--notification=ErrorDomain=AVFoundationErrorDomainCode=-11819"CannotCompleteAction"UserInfo=0x5dfcb0{NSLocalizedRecoverySuggestion=Tryagainlater.,NSLocalizedDescription=CannotCompleteAction},AVPlayer=,currentT
我正在使用MPMoviePlayerViewController。我有一个UINavigationController,但我没有推送它,而是调用了presentModalViewController。这是因为我希望MPMoviePlayerViewController具有交叉溶解过渡(并且我可以将modalTransitionStyle设置为此)。它显示正确,并淡入到位。但是,当它完成时,它会导致先前的View向上滑动到位。这不是我想要的。我试过将modalTransitionStyle和modalPresentationStyle设置为无效。我还对MPMoviePlayerViewC
我有一个ViewController,其中我在popOver中显示一个UIImagePickerController。如果用户选择了一个视频,然后关闭弹出窗口并移至下一个“页面(viewcontroller)”并尝试使用该页面上的MPMoviePlayerViewController播放任何电影,它们是无法这样做。我相信正在发生的事情是图像选择器中显示的播放器以某种方式被保留,因此这个新视频无法播放。我已正确关闭弹出窗口,并且在尝试播放视频时没有收到任何错误。有人遇到过这种情况吗?iOSSDK4.2iPad。 最佳答案 你在设备上试
我正在使用MPMoviePlayerViewController。当视频加载并开始播放时,它不会填满整个屏幕。我必须按下右上角的全屏按钮才能实现。如果我使用MPMoviePlayerController,我根本无法让它填满屏幕。有什么方法可以通过代码使用MPMoviePlayerViewController让我的视频全屏显示而无需按全屏按钮?我知道我在这里使用的是私有(private)API,不过没关系,它只是为了演示。代码:-(void)viewDidLoad{[superviewDidLoad];[[UIDevicecurrentDevice]setOrientation:UIDe
我正在使用MPMoviePlayerViewController,MPMoviePlayerViewController*avPlayer=[[MPMoviePlayerViewControlleralloc]initWithContentURL:url];//[movieViewprepareToPlay];[avPlayer.viewsetFrame:CGRectMake(0,200,320,100)];//player'sframemustmatchparent's[avPlayershouldAutorotateToInterfaceOrientation:UIInterfac
我正在尝试制作自定义演示动画,但VC是一个MPMoviePlayerViewController。我正在学习本教程:当我呈现MPMoviePlayerViewController时,一切正常。但是当我忽略它时,简单的方法是:-(id)animationControllerForDismissedController:(UIViewController*)dismissed没有被调用,我做错了什么?这是代码:-(IBAction)playButtonTouchedIn:(id)sender{NSURL*url=[[NSBundlemainBundle]URLForResource:@"L
我正在开发IOS应用程序(使用Storyoard)。我有一个ViewController://movieViewController.h#import#import@interfacemovieViewController:UIViewController{MPMoviePlayerViewController*moviePlayer;}@property(strong,nonatomic)MPMoviePlayerViewController*moviePlayer;-(void)playMovie;@end//movieViewController.m-(void)viewDidL