我刚刚下载了新的 Xcode 7 beta 5,但找不到解决此错误的方法。它一直突出显示“pickker.mediaTypes = [kUTTypeImage]”行,并说“无法将'[CFString]'类型的值分配给'[String]'类型的值”
if (UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.Camera)){
let picker = UIImagePickerController()
picker.delegate = self
picker.sourceType = UIImagePickerControllerSourceType.Camera
picker.mediaTypes = [kUTTypeImage]
picker.allowsEditing = true
self.presentViewController(picker, animated: true, completion: nil)
}
else{
NSLog("No Camera.")
}