簡體   English   中英

MPMoviePlayerViewController問題

[英]MPMoviePlayerViewController problem

如何在我的應用中播放電影? 我嘗試使用此代碼,但是xcode給了我這個錯誤:

NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"welcome" ofType:@"mp4"];
NSURL  *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
movieView = [[MPMoviePlayerViewController alloc] initWithContentURL: movieURL];
theMovie = [movieView moviePlayer];
theMovie.scalingMode = MPMovieScalingModeAspectFit;
theMovie.fullscreen = TRUE;
theMovie.controlStyle = MPMovieControlStyleNone;
theMovie.shouldAutoplay = TRUE;

[[[UIApplication sharedApplication] keyWindow] addSubview: movieView.view];   

錯誤

ld: warning: in /Users/Rushil/Documents/StickDeath/MediaPlayer.framework/MediaPlayer, missing required architecture i386 in file
Undefined symbols:
  "_OBJC_CLASS_$_MPMoviePlayerViewController", referenced from:
      objc-class-ref-to-MPMoviePlayerViewController in StickDeathViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

請注意,MPMoviePlayerViewController僅在iOS3.2和更高版本上可用

仔細檢查一下,我認為這就是問題所在。 有關MPMoviePlayerViewController的更多信息

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM