【发布时间】:2015-04-27 18:39:04
【问题描述】:
我在我的应用程序中使用 PHAsset,我需要将图像和视频上传到 api,为此我需要 mime 类型的图像和视频。在以前的 iOS 版本中,我使用以下代码,但在 iOS 8 中,我不知道如何获取 mimetype 我曾尝试查看苹果 PHAsset 编程指南但无法找到它。
ALAssetRepresentation *representation = [asset defaultRepresentation];
NSString *mimeType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass
((__bridge CFStringRef)[representation UTI], kUTTagClassMIMEType);
寻求任何指导。
【问题讨论】:
-
你找到解决方案了吗?
标签: ios ios8 mime-types phasset