iOS编程陷井2,模拟器不可靠 不及格的程序员

同样的代码,模拟器下不工作,真机下可以循环播放。


MPMoviePlayerController *theMovie = [[MPMoviePlayerControlleralloc] initWithContentURL:[NSURLfileURLWithPath:[[NSBundlemainBundle] pathForResource:@"***"ofType:@"mp4"] ]];

theMovie.repeatMode=MPMovieRepeatModeOne;

theMovie.view.frame = self.view.bounds;

[self.view addSubview:theMovie.view];

theMovie.scalingMode = MPMovieScalingModeAspectFill;

原文地址:https://www.cnblogs.com/ioriwellings/p/2263287.html