我正在关注此主题的前一个问题,试图让视频在我的应用程序中播放。我已将名为iobserve1.mov的视频复制到资源文件夹中,并在我的h文件中导入MediaPlayer/MediaPlayer.h。我收到以下错误:将影片添加到iPad应用程序
苹果Mach-O的连接错误 “_OBJC_CLASS _ $ _的MPMoviePlayerController”,从引用:
和
苹果Mach-O的连接错误 连接器的命令,退出代码1失败(使用-v来查看调用)
@interface ObViewControllerIObserveMovie()
@property (weak, nonatomic) IBOutlet UIView *movieView; // this should point to a view where the movie will play
@end
@implementation ObViewControllerIObserveMovie
- (void)viewDidLoad
{
[super viewDidLoad];
NSString *moviePath = [[NSBundle mainBundle] pathForResource:@"iobserve1" ofType:@"mov"];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:moviePath]];
player.view.frame = CGRectMake(184, 200, 400, 300);
[self.view addSubview:player.view];
[player play];
}
在这里的任何帮助将不胜感激。
Mediaplayer框架丢失。 – Popeye 2013-03-12 17:22:05