내 앱에서 재생할 동영상을 얻으려면이 항목에 대한 이전 질문을 따르고 있습니다. iobserve1.mov라는 비디오를 resources 폴더에 복사했고, h 파일에서는 MediaPlayer/MediaPlayer.h를 가져 왔습니다. 나는 다음과 같은 오류가 점점 오전 :ipad 앱에 동영상 추가하기
애플 마하-O 링커 오류를 에서 참조 "_OBJC_CLASS _ $ _ MPMoviePlayerController":
및
애플 마하-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