我如何将其编译?
在这一职能的第二行:
func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject]) {
let mediaType = info[UIImagePickerControllerMediaType] as! CFString!
if UTTypeEqual(mediaType, kUTTypeJPEG) {
println("jpg")
}
}我得到了编译错误:
Cannot invoke 'UTTypeEqual' with an argument list of type '(CFString!, CFString!)'发布于 2015-05-07 03:08:09
UITypeEqual返回Boolean,而不是Bool。处理Boolean的最简单方法是将其与0进行比较。
if UTTypeEqual(mediaType, kUTTypeJPEG) != 0 {https://stackoverflow.com/questions/30089870
复制相似问题