【发布时间】:2014-06-20 03:45:16
【问题描述】:
我正在尝试从 ALAssetsGroup#posterImage 方法创建一个 UIImage。在 Objective-C 中,我可以简单地调用 [UIImage imageWithCGImage:group.posterImage],但在 Swift 中,UIImage(CGImage: group.posterImage) 会给我一个编译器错误:
Could not find an overload for 'init' that accepts the supplied arguments
我做错了什么?
【问题讨论】:
-
这里真正的问题是“找不到过载”消息的信息量不是很大。我建议您对此提出增强请求。 Swift 的错误消息可以做得更好。
标签: ios swift uiimage core-foundation cgimage