gpt4 book ai didi

iphone - MPMoviePlayerViewController 问题

转载 作者:行者123 更新时间:2023-12-03 21:22:12 26 4
gpt4 key购买 nike

如何在我的应用程序中播放电影?我尝试使用此代码,但 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 及更高版本

仔细检查一下,我认为这就是问题所在。 More here about MPMoviePlayerViewController

关于iphone - MPMoviePlayerViewController 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3632802/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com