我无法保存我正在录制的视频。我可以拍摄,但我无法保存,只是想在图书馆拍摄和录制视频。
任何人都可以帮助我吗?
//My Library
import UIKit;
import MobileCoreServices
class LibraryViewController: UIViewController, UINavigationControllerDelegate,UIImagePickerControllerDelegate {
@IBOutlet weak var myRecord: UIImageView!
@IBAction func aBottonPlay(sender: AnyObject) {
var catchVideo = UIImagePickerController()
catchVideo.delegate = self
catchVideo.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
catchVideo.mediaTypes = [kUTTypeMovie]
self.presentViewController(catchVideo, animated: true, completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func imagePickerController(picker: UIImagePickerController, didFinishPickingImage image: UIImage!, editingInfo: [NSObject : AnyObject]!) {
myRecord.image = image
self.dismissViewControllerAnimated(true, completion: nil)
}
}
~>