Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 CALayer 上绘制 CGPath,但是当我在 CALayer 中渲染 CGPath 时,它总是在主 UIView 中绘制。告诉我如何在 CALayer 上绘制 CGPath。
当我尝试在 CALayer 上绘制路径时,它给了我这样的信息:
图片: http ://www.freeimagehosting.net/h1k7e
使用 CAShapeLayer 及其“路径”属性将 CGPath 绘制到 CALayer。
https://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CAShapeLayer_class/Reference/Reference.html#//apple_ref/occ/instp/CAShapeLayer/path
看看这个网站。http://www.ifans.com/forums/threads/tutorial-drawing-to-the-screen.132024/