到目前为止,我有这段代码:
var thumbnailErr: NSError?
var thumbnailDictionary: AutoreleasingUnsafeMutablePointer<AnyObject?> = nil
let getItemSucceeded = url.getPromisedItemResourceValue(thumbnailDictionary, forKey: NSURLThumbnailDictionaryKey, error: &thumbnailErr)
if getItemSucceeded {
}
我现在想把thumbnailDictionary转换成字典或NSDictionary。这是我在Objective-C中的做法:
BOOL thumbnailSucceeded = [urlFromPath getPromisedItemResourceValue:thumbnailDictionary forKey:NSURLThumbnailDictionaryKey error:&thumbnailErr];
if (thumbnailSucceeded) {
NSDictionary *dict = (__bridge NSDictionary *)(void *)thumbnailDictionary;
}
我真的无法想出如何在Swift中做到这一点。求助?