[英]CGPath on CALayer
I want to draw CGPath on CALayer, but when I render CGPath in CALayer it always draw in the main UIView. 我想在CALayer上绘制CGPath,但是当我在CALayer中渲染CGPath时,它总是在主UIView中绘制。 Tell me how can I draw CGPath on CALayer.
告诉我如何在CALayer上绘制CGPath。
When I try to draw path on CALayer it gives me something like this: 当我尝试在CALayer上绘制路径时,它给我这样的东西:
Image: http://www.freeimagehosting.net/h1k7e 图片: http : //www.freeimagehosting.net/h1k7e
Use a CAShapeLayer and its 'path' property to draw a CGPath to a CALayer. 使用CAShapeLayer及其“path”属性将CGPath绘制到CALayer。
https://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CAShapeLayer_class/Reference/Reference.html#//apple_ref/occ/instp/CAShapeLayer/path https://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CAShapeLayer_class/Reference/Reference.html#//apple_ref/occ/instp/CAShapeLayer/path
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.