Ios5 iOS 5.0:MPMoviePlayerViewController完全停止工作
我今天花了一整天的时间让MPMoviePlayServiceWController在iOS5上工作,但不管我做什么,都无法让它工作!以下代码在除iOS5.0以外的任何iOS上都能正常工作。无法获得与此主题相关的太多帮助。有谁知道IOS5.0中发生了什么变化,导致下面的简单代码崩溃!我注意到,在iOS 5.0上,它在无限循环中检查loadstate到MPMovieLoadStateUnknown!它永远无法玩Ios5 iOS 5.0:MPMoviePlayerViewController完全停止工作,ios5,loading,state,mpmoviewcontroller,Ios5,Loading,State,Mpmoviewcontroller,我今天花了一整天的时间让MPMoviePlayServiceWController在iOS5上工作,但不管我做什么,都无法让它工作!以下代码在除iOS5.0以外的任何iOS上都能正常工作。无法获得与此主题相关的太多帮助。有谁知道IOS5.0中发生了什么变化,导致下面的简单代码崩溃!我注意到,在iOS 5.0上,它在无限循环中检查loadstate到MPMovieLoadStateUnknown!它永远无法玩 #import "MyMoviePlayer.h" @implementation M
#import "MyMoviePlayer.h"
@implementation MyMoviePlayer
@synthesize moviePlayerViewController;
- (void) checkAndPlay:(UIViewController *)view {
if ([[moviePlayerViewController moviePlayer] loadState] == MPMovieLoadStateUnknown) {
NSLog(@"Rechecking");
[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(checkAndPlay:) userInfo:nil repeats:NO];
} else {
[moviePlayerViewController setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
[view presentModalViewController:moviePlayerViewController animated:YES];
}
}
- (void)play:(NSURL*)movieURL andWithView:(UIViewController *)view {
moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL];
[self checkAndPlay:view];
}
你最终解决了你的问题吗?没有。这在iOS 5.0上不起作用。我们坚持[查看presentModalViewController:MoviePlayerServiceController动画:是];解决方案