我创建了一个在按钮单击时播放电影的应用程序。我的应用程序正在运行,没有任何警告或错误。但是我看不到电影不知道为什么?我添加了媒体播放器框架并在 viewController.h 中导入了#import 我的按钮操作代码如下... -(IBAction)playMyMovie:(id)sender{
NSBundle *bundle =[NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"jumps" ofType:@"mov"];
NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
MPMoviePlayerController *theMovie =[[MPMoviePlayerController alloc] initWithContentURL:movieURL];
theMovie.scalingMode = MPMovieScalingModeAspectFill;
[theMovie play];
}
请告诉我我错过了什么..