// Move the recorded temporary file to a user-specified location (视频文件另存储过程,依据用户选择的路径和文件保存名)
NSSavePanel *savePanel = [NSSavePanel savePanel];
[savePanel setAllowedFileTypes:[NSArray arrayWithObject:AVFileTypeQuickTimeMovie]];
[savePanel setCanSelectHiddenExtension:YES];
[savePanel beginSheetModalForWindow:[self windowForSheet] completionHandler:^(NSInteger result) {
NSError *error = nil;
if (result == NSOKButton) {
[[NSFileManager defaultManager] removeItemAtURL:[savePanel URL] error:nil]; // attempt to remove file at the desired save location before moving the recorded file to that location
if ([[NSFileManager defaultManager] moveItemAtURL:outputFileURL toURL:[savePanel URL] error:&error]) {
[[NSWorkspace sharedWorkspace] openURL:[savePanel URL]];
} else {
[savePanel orderOut:self];
[self presentError:error modalForWindow:[self windowForSheet] delegate:self didPresentSelector:@selector(didPresentErrorWithRecovery:contextInfo:) contextInfo:NULL];
}
} else {
// remove the temporary recording file if it's not being saved
[[NSFileManager defaultManager] removeItemAtURL:outputFileURL error:nil];
}
}];

效果图:
<img src="http://img.blog.csdn.net/20140807162831514?

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2h1YW55aXR1b2t1/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />

最新文章

  1. ES6 对象解构
  2. Oracle 查询性能优化实践
  3. flex的http URL转码与解码
  4. 《你不知道的javascript》一、函数作用域和块作用域
  5. php防盗链,php ci在control里面控制除了自己站内的链接点击跳转,其他来源的都跳到站内页面
  6. [欧拉] poj 2230 Watchcow
  7. linux 防火墙--firewalld学习
  8. 《图解CSS3》——笔记(一)
  9. 在外部存储器上写入或读取文件(Environment类、File类的使用)
  10. react学习笔记1--基础知识
  11. 《.NET 编程结构》专题汇总
  12. UIView的生命周期和layout方法总结
  13. 【小瑕疵】表单中的button会自动提交?
  14. Redis学习-复制
  15. CSS input type=&quot;number&quot;出现上下箭头时解决方案
  16. angular2.x指令
  17. 使用 new XMLHttpRequest() 制作下载文件进度条
  18. 第25月第3天 Mxshop项目记录01
  19. POJ 3083 Bfs+Dfs
  20. [leetcode]496. Next Greater Element I下一个较大元素

热门文章

  1. 11-3 re模块
  2. 11-2 numpy/pandas/matplotlib模块
  3. vue列表排序实现中的this问题
  4. 51nod 1175 区间第k大 整体二分
  5. [BZOJ] 1037 [ZJOI2008]生日聚会
  6. sort 结构体 正数负数分开排序
  7. C++ stringstream的用法
  8. [COJ0968]WZJ的数据结构(负三十二)
  9. [luoguP3390]【模板】矩阵快速幂
  10. python 安装依赖几个问题---HttpScan