【发布时间】:2015-06-08 10:18:25
【问题描述】:
是否可以在CALayer 中绘制现有的png 图像?如果没有,我怎样才能将图像作为CALayer 的子层?
【问题讨论】:
标签: objective-c uiimage calayer
是否可以在CALayer 中绘制现有的png 图像?如果没有,我怎样才能将图像作为CALayer 的子层?
【问题讨论】:
标签: objective-c uiimage calayer
可以,只需设置图层的contents:
layer.contents = (id) [UIImage imageNamed:@"yourImageNamed"].CGImage;
【讨论】: