Use of undeclared identifier 'kUTTypeImage'

2023年4月7日 625点热度 0人点赞 0条评论

出现此问题一般是在获取系统图片的时候,提示此错误,kUTTypeImage 属于 MobileCoreServices.framework 库。

问题识别

Xcode提示错误: Use of undeclared identifier 'kUTTypeImage'

 

问题原因

缺少 MobileCoreServices.framework 库依赖的引入

 

解决方法

Swift:

/// 在需要的地方引入
import MobileCoreServices

 

Obj-C:

/// 在需要的地方引入
#import <MobileCoreServices/MobileCoreServices.h>

 

帮助教程

提供最新的帮助教程,方便使用。

文章评论