嗨,我正在使用var imagePicker:UIImagePickerController!
实例捕获视频5秒钟,但在一秒钟后停止了。
该如何解决?
在此先感谢您的帮助。
func startCameraFromViewController(type:PickerMode, viewController: UIViewController, withDelegate delegate: UIImagePickerControllerDelegate & UINavigationControllerDelegate) -> Bool {
if UIImagePickerController.isSourceTypeAvailable(.camera) == false {
return false
}
pickerMode = type
self.imagePicker = UIImagePickerController()
imagePicker.sourceType = .camera
imagePicker.mediaTypes = [kUTTypeMovie as NSString as String]
imagePicker.allowsEditing = false
imagePicker.delegate = self
imagePicker.videoMaximumDuration = 5
}