1
播放視頻來啓動應用程序播放視頻來啓動應用程序的Xcode
我有這樣的代碼,我不能看視頻,我可以聽到聲音。
任何人都可以解釋爲什麼?
-(void)awakeFromNib
{
NSURL *url2 = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"tecnolitevideo_1" ofType:@"mov"]];
moviePlayer = [[MPMoviePlayerViewController alloc]
initWithContentURL:url2];
[moviePlayer presentMoviePlayerViewControllerAnimated:moviePlayer];
[moviePlayer.moviePlayer play];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayerPlaybackStateChanged:) name:MPMoviePlayerPlaybackStateDidChangeNotification object:nil];
}
-(void)moviePlayerPlaybackStateChanged:(NSNotification *)notification {
}
感謝它的工作! – Dachami