我试图从照片库中获取图像数据:
let manager = PHImageManager.default()
let options = PHImageRequestOptions()
options.isSynchronous = false
let rId = manager.requestImageData(for: asset, options: options) { data, _, _, info in
}
出于测试目的,我在请求呼叫后立即取消了请求:
manager.cancelImageRequest(rId)
但即使请求被取消,仍然会调用PHImageManager的完整处理程序块。我也找不到PHImageCancelledKey
info
我做错了什么?