6
我得到了一個錯誤轉換CFString。錯誤消息是:在Swift 2.0和XCODE 7中將CFString轉換爲字符串kUTTypeImage
無法將類型'[CFString]'的值分配給類型爲'[String]'的值。
如何修復?
picker.sourceType = UIImagePickerControllerSourceType.Camera
picker.allowsEditing = false
picker.mediaTypes = [kUTTypeImage] //Error Message : Cannot assign a value of type '[CFString]' to a value of type '[String]'
picker.delegate = self
picker.modalPresentationStyle = .Popover
presentViewController(picker, animated: true, completion: nil)//
謝謝您的回答 –