type 'CFString!' does not conform to protocol 'NSCopying'
//编译ImageIO库发现提示这个问题,解决办法比较简单直接转换成NSString即可。
var gifProperties : NSDictionary = properties[kCGImagePropertyGIFDictionary] as NSDictionary
//改为:
var gifProperties : NSDictionary = properties[kCGImagePropertyGIFDictionary as String] as NSDictionary
本文探讨了在使用ImageIO库时遇到的编译错误,即'type'CFString!'does not conform to protocol 'NSCopying'。通过将CFString转换为NSString,成功解决了该问题。文中详细介绍了错误原因及解决步骤,旨在帮助开发者避免类似困扰。
1662

被折叠的 条评论
为什么被折叠?



