【发布时间】:2016-10-25 08:49:57
【问题描述】:
我收到此错误:
self.contents = (id)_stillImage.CGImage;
_stillImage 是 UIImage,类是 CALayer。
如何解决?
【问题讨论】:
-
为什么投成
id -
因为内容是 id 类型
-
你能写至少4到5行代码吗
-
你可能想写
... = (id)(_stillImage.CGImage);,因为id没有CGImage这样的属性。
标签: ios objective-c uiimage