objective-c
NSString* mimeType = (__bridge_transfer NSString*)UTTypeCopyPreferredTagWithClass
((__bridge CFStringRef)assetInfo.dataUTI, kUTTagClassMIMEType);
assetInfo.dataUTI // UTI从PHAsset获取requestImage数据。
最佳答案
最后,我从UTI创建了mimeType
let mimeType = UTTypeCopyPreferredTagWithClass(dataUTI! as CFString, kUTTagClassMIMEType as CFString)?.takeRetainedValue() as String?
关于ios - 如何快速将PHASset UTI转换为MIME类型的字符串,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44528148/