0

我正在使用下面的代码播放电影,但想知道当用户按下按钮时,是否有办法将我保存在应用程序中的电影文件保存到设备的相机胶卷中。

NSString *moviePath = [[[NSBundle mainBundle] resourcePath]
  stringByAppendingPathComponent:@"video.m­p4"];
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc]
initWithContentURL:[NSURL fileURLWithPath:moviePath]];

moviePlayer.movieControlMode = MPMovieControlModeDefault;

[[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(movieFinishedCallback­:) 
name:MPMoviePlayerPlaybackDidFinishNotif­ication object:moviePlayer]; 

[moviePlayer play];
4

1 回答 1

0

很简单,看看这个其他问题的答案,

将应用内视频保存到相机胶卷?

你会使用:UISaveVideoAtPathToSavedPhotosAlbum

于 2013-03-03T17:11:30.577 回答