代码示例
NSString *filePath = @"xxxx";
UISaveVideoAtPathToSavedPhotosAlbum(filePath, weakSelf, @selector(video:didFinishSavingWithError: contextInfo:), nil);
- (void)video:(NSString *)videoPath didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{NSString *message = @"保存视频到相册成功";if (error) {message = @"保存视频到相册失败";}UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:message preferredStyle:UIAlertControllerStyleAlert];UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {}];[alertController addAction:cancelAction];[self presentViewController:alertController animated:YES completion:NULL];
}